Skip to main content

what is url pattern to access EJBs in glassFish,Please

3 replies [Last post]
Joined: 2005-12-28

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 :


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.
Joined: 2003-09-03

do you mean the jndi name?

Joined: 2005-12-28

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

Joined: 2005-07-22

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:

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.