Skip to main content

what is url pattern to access EJBs in glassFish,Please

3 replies [Last post]
legolas_w
Offline
Joined: 2005-12-28
Points: 0

Hi
thank you for reading my post.
What is url pattern for glassFish EJB3 ?
for example if i want to access an ejb from a file like
legols-ejb.jar file , what will be the url pattern to access to a CMP named
legTest ?

for example will it loooks like :

legols-ejb/legTest/local

to access the local interface of that CMP?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vbkraemer
Offline
Joined: 2003-09-03
Points: 0

do you mean the jndi name?

legolas_w
Offline
Joined: 2005-12-28
Points: 0

yes i mean jndi name , as i explained , if i hade an ejb named legEJB in a deployed application named legolas
what will be its jndi access name?url

thank you

hzhang_jn
Offline
Joined: 2005-07-22
Points: 0

This part has not changed in EJB3.

You can either use ejb-link to refer to a local ejb. Or use global jndi name to refer to it. In latter case, you will need to define the jndi name for the ejb in sun-ejb-jar.xml. Then in the referring component's sun-*.xml, refer to that jndi name.

You could look at this test as example:

http://fisheye5.cenqua.com/viewrep/glassfish/appserv-tests/devtests/ejb/...

Here, you can see both cases in action.

"Item" bean is referred by "Customer" bean by ejb-link.

"Customer" bean is referred by the client by using jndi-name.