Accessing Beans (EJB)

3 April 2008

In the post, I will write about how to accessing a bean in EJB.

Accessing deployed beans is simple. First write the the client code and set up JNDI environment settings for the client. It can be done via a JNDI properties file. Now you have to set the class path for the client and add the following file locations to it:

jboss-client.jar, jnp-client.jar, EJB interfaces, and the directory where the JNDI properties file is stored

Remember, two JNDI settings must be made which are:
- the initial context factory
- the provider URL

These properties are best established in a JNDI properties file.

After setting jndi.properties file, place it in a directory and place that directory into the client’s classpath.
Now simply drop the JAR into the deploy directory, start the client, and invoke the EJB service.

del.icio.us:Accessing Beans (EJB)  digg:Accessing Beans (EJB)  spurl:Accessing Beans (EJB)  wists:Accessing Beans (EJB)  simpy:Accessing Beans (EJB)  newsvine:Accessing Beans (EJB)  blinklist:Accessing Beans (EJB)  furl:Accessing Beans (EJB)  reddit:Accessing Beans (EJB)  fark:Accessing Beans (EJB)  blogmarks:Accessing Beans (EJB)  Y!:Accessing Beans (EJB)  smarking:Accessing Beans (EJB)  magnolia:Accessing Beans (EJB)  segnalo:Accessing Beans (EJB)  gifttagging:Accessing Beans (EJB)

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: Accessing Beans (EJB)

Leave a Reply