Accessing Beans (EJB)
3 April 2008In 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.
Related Posts:
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)