wood burning stoves 2.0*
The moose likes Servlets and the fly likes Servlet As EJB Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet As EJB Client" Watch "Servlet As EJB Client" New topic
Author

Servlet As EJB Client

Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
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

Joined: Mar 04, 2004
Posts: 75
//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

Joined: Mar 05, 2004
Posts: 5
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet As EJB Client