Forums Register Login

Remote EJB DI

+Pie Number of slices to send: Send
how does DI works for remote client.

if client is remote servlet, how does it get EJB

will @EJB (DI) work?
or lookup is the only option?

I am confused how does it find out where EJB is registered (where is the container)?
+Pie Number of slices to send: Send
Deepika,

@EJB works remotely, but you'll have to specify the server in the mapped name. Take a look here: http://forums.java.net/jive/message.jspa?messageID=254961.

Hope it helps,
Reza
+Pie Number of slices to send: Send

thanks a lot.....
Link is helpful.....

@EJB(mappedName=serverAdd:port:ejbName)
+Pie Number of slices to send: Send
Reza,

EJB 3 IN Action page 55, client is accessing Remote EJB using just
@EJB

you may like to add this in corrections list......

thanks....
+Pie Number of slices to send: Send
Deepika,

You can use just @EJB for remoting, as long as it is on the same cluster or you are using an application client.

Thanks,
Reza
+Pie Number of slices to send: Send
thanks a lot for reply......
I would try to understand what you have conveyed (same cluster ) .......
+Pie Number of slices to send: Send
Deepika,

A cluster means a set of application servers that are grouped together. While using EJB remoting, a client requests from the web tier can be routed to an EJB residing on a server on a separate VM.

Hope it helps,
Reza
+Pie Number of slices to send: Send
Reza,

thanks a lot for quick reply..... thanks....

this is new concept to me.... I am assuming (cluster) SET of SERVERS as single entity where client in one server can access (remote) EJB in another server... without mappedName parameter.....

I am not sure about my interpretation of what you have suggested...
please don't mind if it's not correct......

thanks .....
I was born with webbed fish toes. This tiny ad is my only friend:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1043 times.
Similar Threads
Why not use Dependency Injection of Stateful session bean inside a stateless session bean?
EJB client with DI - @EJB injection doesn't work
EJB Accessibility
@EJB annotation from a remote client
Help regarding RemoteClient
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:43:39.