Web Client calling session bean how? EJB3

How do i call a session bean which is:

- Client local

-Client

Client local and Client are in package Session

from a web client.

-Struts action

I know that u have to use JNDI with initial context, but i cannot find an example.

If someone can provide me an example, i will be grateful as i have Business logic and Web client ready, i just need to join them together.

Thanks in advance

[437 byte] By [infonotea] at [2007-10-2 20:47:15]
# 1

I think i managed to make the initialcontext in the correct way.

However i am getting an ejb not bound error.

Session bean is called ClientFacade and ClientFacadeLocal.

I call the ejb using jndi:

//Call EJB

InitialContext context = new InitialContext();

ClientFacadeLocal client = (ClientFacadeLocal)context.lookup("java:comp/env/ejb/ClientFacadeLocal");

I call a method from session bean, the web client compiles well.

I am using JBoss.

I have everything ready accept connections between ejb and struts action class.

Thanks in advance

Message was edited by:

infonote

infonotea at 2007-7-13 23:31:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...