This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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.
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 ..
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com