• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB Interfaces

 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I were to make a regular client server application, say over RMI, my server would expose certain APIs. How different are these APIs when implemented with EJBs? I'm wondering if most EJB implementations take extra parameters. Specifically, I'm thinking because many EJB servers are accessed through a web/servlet interface, that may cause extra parameters to be used, in the name of design and conveinence; but I'm wondering about any type of alteration.
For example, suppose I had some typical database application. My exposed methods might be as follows:

would EJB methods likely have addition paramters, e.g. HTTPSession values? If they do, are there still likely to be the "raw" EJBs without the source dependent parameters, floating around, and accessible on the EJB server?
My motivation is that I want to access EJBs from a custom client, and I'm wondering if there will be "legacy" complications. I've looked though Sun's Petshop example, and, at least in that example, the "source independent" EJBs exist and I can use them.

--Mark
hershey@vaultus.com
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There would be no additional parameters that you would have to pass to the methods that you mentioned. The class that you create would have to implement a certain interface, for example SessionBean, so you'd have to code certain other methods like ejbCreate along with the methods you mentioned. The client would change in that it would have to access the home bean(container) via RMI and then use it to create a bean that has on it the methods you're interested in.
 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The methods that you have mentioned (are business methods) would be declared in the remote interface and defined in the Bean class.
You your current design is using servlets and if you are using the methods of HttpServletRequest and HttpSession, then may be you need to pass these as additional parameters. It depends ..

reply
    Bookmark Topic Watch Topic
  • New Topic