3 Replies Latest reply on Jul 5, 2002 6:58 AM by jason

    Deploying simple EJB

    Chaudary Arif Newbie

      I am trying to deploy a simple EJB on JBoss. Can any body help with this in a step by step approach.

      I have the class files compiled i.e. the home, remote interfaces & the implementation class. What next and how to proceed?

      Thank you,


        • 1. Re: Deploying simple EJB
          Chaudary Arif Newbie

          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.


          • 2. Re: Deploying simple EJB
            Hermann Schmitt Newbie

            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
              jason Newbie

              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();

              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.