aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Whether to go for JDO or Entity Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Whether to go for JDO or Entity Bean" Watch "Whether to go for JDO or Entity Bean" New topic
Author

Whether to go for JDO or Entity Bean

Malay Thakkar
Ranch Hand

Joined: Jun 22, 2000
Posts: 52
I am doing a project which is very crucial on the performance point of view.I have a persistence layer . I am thinking to go for JDO rather than Entity beans, beacuse using entity beans performance gets degraded.So will the JDO provide me with the right approach and can it be used with EJB's and JSP's.
Can I also get the scalability and the 2 phase commit feature of the Entity bean.Also can I get transaction managment support in JDO.
Regards
Malay
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
You can get everything available to Entity Beans in JDO by wrapping it with Session Facades. The problem is that JDO is not fully supported by any product yet. The safe choice is EJB, if you are feeling adventurous than you could you with the JDOish
Castor or the future JDO OJB.
Malay Thakkar
Ranch Hand

Joined: Jun 22, 2000
Posts: 52
Thanks Chris for your reply.
But with Entity Bean don't u feel there is a bottleneck of performance.
Regards
Malay
Michael McConnell
Greenhorn

Joined: Jul 16, 2002
Posts: 1
Even tho JDO is not supported, Castor is supported by lots of people just like Apache, Xerces, Turbine, etc, etc. You might want to check out
Castor at Castor Homepage
Call me slow, but I didnt realize you COULD substitute something like JDO or Castor for enitiy beans.
Thats really interesting.


--Michael McConnell--<br />Deru kugi ga utareru. <br />(Any nail sticking out will get hammered. - Japanese proverb)
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
hi there
can anyone enlighten me on JDO ? what is JDO ? any good links ?
thanks
p
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

If you extend the features of JDO to contain all the features of EJBs, you might as well have gone ahead and USED EJBs. First, because the code's already been thought out and (more or less) debugged for you. Secondly, because Maintenance programmers will have an easier time working with a well-known standard than with a "one-of-a-kind" implementation. And finally, because part of what's in the EJB implementation is code to help optimize your data access within that feature framework anyway.


Customer surveys are for companies who didn't pay proper attention to begin with.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
What is being extended?
Remoteablity? I hope we put Session Facades on our Entity Beans already.
Transactioning? This is usually managed by the Facade as well, especially for fine-grained Entity Beans.
Caching? Entity Beans do a terrible job at this (actually the container do the terrible job). That is why performance with Entity Beans is so poor. To get decent performance you need a third-party product like Coherence.
Clustering? Since no containers support distributed caches or distributed locking of Entity Beans clustering is pretty poor these days. Therefore we once again rely on clustering through the Session Facade to local Entity Beans.
Security? Session Facade.
Persistance? Well this is what JDO is all about.
Anything else that you percieve as a benefit to Entity Beans? I don't think anything is being rewritten, I just don't think Entity Beans offer much benefits (but considerable limitations) over other solutions.
Of course, Entity Beans are here today and JDO is still very vaporous.
Disclaimer: I currently use Entity Beans, I am just looking for a better solution.
[ October 02, 2002: Message edited by: Chris Mathews ]
Malay Thakkar
Ranch Hand

Joined: Jun 22, 2000
Posts: 52
Thanks Chris
For replying I got lot of info....from ur reply.I know JDO is still in the initial phase.
How is Castor and is it supported by Websphere.
Regards
Malay
Rob Misek
Ranch Hand

Joined: Sep 24, 2002
Posts: 41
Hi Mallay,
Since you are very concerned about performance I would recommend taking a look at Tangosol's Coherence clustered cache/objectstore product. It is _very_ easy to use since the cache is accessed through the java.util.Map interface.
Another reason that I would reccommend it to you is that there is a Transactional Cache that is currently in pilot. This Transactional Cache allows for the underlying cache to be manipulated within the EJB transactional context and modification to the cache are either rolled-back or committed depending on the behavior of the EJB transaction.
Coherence also has replicated and distributed cache features along with cluster-wide locking, event notification, fail-over and transparent restarts.
Later,
Rob Misek
http://www.tangosol.com


<a href="http://www.tangosol.com" target="_blank" rel="nofollow">www.tangosol.com</a><br /><a href="http://www.tangosol.com/coherence.jsp" target="_blank" rel="nofollow">Coherence:</a> Easily share live data across a cluster!
Malay Thakkar
Ranch Hand

Joined: Jun 22, 2000
Posts: 52
Hi Mallay,
Since you are very concerned about performance I would recommend taking a look at Tangosol's Coherence clustered cache/objectstore product. It is _very_ easy to use since the cache is accessed through the java.util.Map interface.
Another reason that I would reccommend it to you is that there is a Transactional Cache that is currently in pilot. This Transactional Cache allows for the underlying cache to be manipulated within the EJB transactional context and modification to the cache are either rolled-back or committed depending on the behavior of the EJB transaction.
Coherence also has replicated and distributed cache features along with cluster-wide locking, event notification, fail-over and transparent restarts.
Later,
Rob Misek
http://www.tangosol.com
--------------------

Thanks Rob for your valued reply.
Actually it will be really helpful for me as I can evaluate it.Can you tell me whether it will have any problem with Websphere Application Server?
Best Regards
Malay
Rob Misek
Ranch Hand

Joined: Sep 24, 2002
Posts: 41
Hi Again Mallay,
I can tell you that we have no problem running winthin the WebSphere Application Server or for that matter any other container or JVM. Coherence is completely JVM/AppServer agnostic.
We actually have a Coherence HTTP-Session Replication Module for WAS 4.0.x, which I wrote , that allows each member of a Server Group to hold the session information within Coherence as oppossed to persisting it in the DataBase (huge round-trip cost). This greatly increases the performance of a WebSphere Server Group.
Don't hesitate to call me with any question or comments.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Coherence is completely JVM/AppServer agnostic.

So Coherence doesn't believe in JVMs or App Servers?
Rob Misek
Ranch Hand

Joined: Sep 24, 2002
Posts: 41
Coherence "believes in the existence of" JVMs and App Servers but will not commit to which is the "One True" JVM or App Server
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Whether to go for JDO or Entity Bean
 
Similar Threads
lots of tables, what kind of mapping?
EJB VS JDO
Entity vs JDO
Can we use stored procedures in JDO?
EJB vs. JDO