Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet As EJB Client

 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How should a servlet be packaged and what, if anything, should be included in its manifest if it is to be a client of an ejb that is deployed separately so that the servlet's application will not need to be redeployed if changes are made to the ejb and it is redeployed? Please help. Thanks.
 
john smith
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
//How should a servlet be packaged
However you'd like it to be - in a jar, in a war, as part of an ear or just as unpackaged class files. It's entirely up to you. You don't need anything in the manifest.
Assuming your ejb is in a seperate application (its normal to deploy the client as a war and the ejb layer seperately as whatever suits) all the servlet need do is lookup a reference to the ejb to use it. You can redeploy the ejb to your heart's content without having to redeploy the servlet.
 
Dragos Haiduc
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should also add a reference to your EJB in your web.xml descriptor with the help of the <ejb-ref></ejb-ref>tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic