This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Web Services and the fly likes Using EJB for Web Services Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Using EJB for Web Services" Watch "Using EJB for Web Services" New topic
Author

Using EJB for Web Services

Daniel Dor-Chay
Greenhorn

Joined: Feb 29, 2004
Posts: 8
Just finished developing prototyping web services using a simple Java class exposed as a stateless rpc web service to connect to Oracle. The java class simply packs/unpacks data and a PL/SQL stored procedure is called to do most of the work. The databases acceses are mostly simple get and update functions. We chose PL/SQL because we think that it will be more performant than using only Java.
My question is: Would it useful to use stateless session EJBs for our Java layer? What are the pros/cons?
Another question: Should we scrap the PL/SQL and use Entity Beans instead?
We were using JDeveloper for our web services during the protoype and deploying to 9iAS. But the client requires that we use WebSphere so we're migrating to WSAD, but we're still using Oracle as our database. What are the implications of this?
Howard Kushner
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 361
I'm shooting from the hip here, but what the heck...
Sounds like your using POJO's (Plain Old Java Objects) for your prototype. No problem there. Now let think about EJB's. Stateless session beans are distributed and transactional but these container provided services are not free. There is a price to be paid in terms of overhead, so you need to figure out if you need really need them. How important is J2EE to you? I would guess that interoperability (read J2EE) is an important consideration since you are using WebSphere in conjunction with Oracle. Since you already have the PL/SQL written, I'm not sure you want entity beans. I still subscribe to the K.I.S.S. principle, if you know what I mean. HTH


Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
Daniel Dor-Chay
Greenhorn

Joined: Feb 29, 2004
Posts: 8
Thanks for your reply Howard,
Would there be a good way to test whether it would be better for me to use Stateless Session Beans or POJOs? How could I make it easier for myself to make an informed decision?
Daniel.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Using EJB for Web Services
 
Similar Threads
Finders Fee Available
Using EJBs with Web Services
Java Stored Procedure in SQL Server
Design / implementation ideas needed regarding pulling data from external systems
Convert HTML to PDF (100% Java)