-
1. Re: Deploying simple EJB
zeeshanarif Jul 1, 2002 5:40 PM (in response to zeeshanarif)Ok. I got it to work. I put everything of the bean in a .jar file and deployed it. Thats it.
Now, I am trying to access database (e.g. Oracle or cloudscape). How to access the database from the bean? How to define datasource and provide the driver classes?
Thanks again.
Zeeshan -
2. Re: Deploying simple EJB
schmitther Jul 2, 2002 4:06 AM (in response to zeeshanarif)Hello,
you must also create an ejb-jar.xml and perhaps an jboss.xml.
Then you must put all these entries into a jar file and move the jar file into the deploy directory of jbooss. -
3. Re: Deploying simple EJB
shogun1234 Jul 5, 2002 6:58 AM (in response to zeeshanarif)hi, would you like to post the source code of example you successful depolyed and running on jboss? for i encounter a NameNotFoundException; i have no idea exactly what it's, but i guess it might be because name specified in lookup method could not be found.
InitialContext ctx = new InitialContext();
HelloHome home = (HelloHome)
javax.rmi.PortableRemoteObject.narrow(obj, HelloHome.class);
Hello hello = home.create();
System.out.println(hello.hello());
hello.remove();
in fact, i only follow up the code on masterEJB (on theserverside) with simply modified. also, the script i use to run is
java -classpath "./:./lib/client/jbosssx-client.jar:./lib/client/jnp-client.jar:./lib/client/jboss-client.jar:./lib/client/jboss-common-client.jar:./lib/client/jboss-j2ee.jar:./lib/client/jboss-j2ee.jar:./lib/client/log4j.jar:./lib/" examples.HelloClient
in which jndi.properties located in lib/ dir.