G***@xcomp.com.au
2002-07-31 05:28:01 UTC
Hi All.
It seems there are some problems with the struts part of the sample
application shipped with middlegen. So I am trying to write my own
simple client to test that the ejb's are deployed and working properly.
I have successfuly generated and deployed the airline-ejb.jar file in
JBoss, so the ejb's should be deployed. I have a simple client (below).
When I run it I get the error:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
I'm not really sure how I should be using the XXXUtil, XXXLocalHome and
XXXLocal interfaces (I have never come across a "local" home interface
before). Can someone explain this??? How do I get the client to work???
---------
package airline;
import airline.interfaces.*;
/**
* Test the 'Airline' application.
*/
class AirlineClient{
public static void main(String[] args){
try{
PersonLocalHome personLocalHome = PersonUtil.getLocalHome();
PersonLocal allah = personLocalHome.findByPrimaryKey(new
Integer(2));
}
catch(Exception e){
System.out.println(e.toString());
}
}
}
thanks!!
--
Glenn
It seems there are some problems with the struts part of the sample
application shipped with middlegen. So I am trying to write my own
simple client to test that the ejb's are deployed and working properly.
I have successfuly generated and deployed the airline-ejb.jar file in
JBoss, so the ejb's should be deployed. I have a simple client (below).
When I run it I get the error:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
I'm not really sure how I should be using the XXXUtil, XXXLocalHome and
XXXLocal interfaces (I have never come across a "local" home interface
before). Can someone explain this??? How do I get the client to work???
---------
package airline;
import airline.interfaces.*;
/**
* Test the 'Airline' application.
*/
class AirlineClient{
public static void main(String[] args){
try{
PersonLocalHome personLocalHome = PersonUtil.getLocalHome();
PersonLocal allah = personLocalHome.findByPrimaryKey(new
Integer(2));
}
catch(Exception e){
System.out.println(e.toString());
}
}
}
thanks!!
--
Glenn