• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remote EJB DI

 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)?
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

@EJB(mappedName=serverAdd:port:ejbName)
 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot for reply......
I would try to understand what you have conveyed (same cluster ) .......
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic