• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

separate webserver and application server

 
eswar kumar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam using webserver and application servers separatly what i have to write to communicate both the servlet and ejbs? can any one of you write the small code snippets for me pls..
thanks inadvance
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only difference comes in the way you lookup your EJBs. Instead of

you need to lookup the context from the remote server as follows:
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to be very precise here. There are two possibilities; either you separate the Web server(something like Apache or IIS) from the Application Server (which contains both the Web Container and EJB Container) or you can separate the Web Container from the EJB Container. Which do you really mean?
Kyle
[ December 20, 2003: Message edited by: Kyle Brown ]
 
Mark Lybarger
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'd suspect as the other poster did that the application server == ejb (component) container, and web server == web container.
 
eswar kumar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually tomcat (Servlet container) is running in one system and EJBs are running in another system which are physically separate systems
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eswar,

In your particular scenario, I'd use Spring on Tomcat to inject the remote EJB (presumably EJB 3) instances. Look into Spring support for @EJB, @Resource and the <jee:jndi-lookup> element. Otherwise, you can have OpenEJB on Tomcat do the remote injection for you, but that is a little overkill in this case since all you really need is injection and not other EJB container services.

Hope it helps,
Reza
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic