Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Building servelets as a client in weblogic8.1  RSS feed

 
Vasantha Prabha
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Weblogic 8.1, can we build servelets as a client & session bean as a EJB component? In the examples given along with the standard installation, only client applications are shown. I am using ant as a build tool. Can someone tell me how I can go about it?

regards
Sangeetha
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically, there is really no difference in the code that you would write if the client is standalone or if the client is a Servlet. You access and use an EJB the same way...
1. Get an IntitialContext
2. Lookup your SessionBean's Home Interface in JNDI
3. Call create on the Home Interface to get a instance of the component.
4. Use the SessionBean however you like
5. Call remove() on the SessionBean when you are done
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!