-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Few more achitecture questions
PostPosted: Thu Mar 24, 2005 4:03 pm 
Regular
Regular

Joined: Tue Nov 30, 2004 4:23 pm
Posts: 62
1) Is 3.0 compliant with our version of WLS?
2) Does version 3.0 require XA Drivers?
3) If we have a distributed (clustered) environment and start a transaction which spans EJB's participating in the transaction which are running on separate boxes, and each of those EJB's creates a session, will the transaction and database access work appropriately (especially in the case of a failure and subsequent rollback)?
3a) Should each EJB create a session or should the coordinator of all the EJB calls pass session information to each of the EJBs and therefore the coordnator would be incharge of the rollback?
3b) What happens with the transactioning in the above when JMS is thrown into the mix.
4) If you are just using searching functionality...for instance one of our applications allows consumers to query for doctors in their area and this may produce multiple results. And the user may have to search multiple times to get the exact requirements that they are looking for. Is this a good place for Hibernate and do I base that decision on how the object model is used in this portion of the application, or do I say no to Hibernate because I am specifically looking for speed searches without updates/deletions/insertions?

Thanks for your time & help,

jay


Top
 Profile  
 
 Post subject: Distributed EJB/Transaction Questions
PostPosted: Mon Mar 28, 2005 12:03 pm 
Regular
Regular

Joined: Tue Nov 30, 2004 4:23 pm
Posts: 62
I did not receive any responses on these questions. I am really interested in getting a response at least for question 3.

Help.

-jay


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 28, 2005 3:03 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I can just say that hibernate if configured properly will join any running JTA if its available.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 28, 2005 8:44 pm 
Regular
Regular

Joined: Tue Nov 30, 2004 4:23 pm
Posts: 62
Just so that I understand this right for explaining later.

If I have multiple servers that are running a J2EE container and EJBs, let's say that an action from the web makes a request to an SLSB or java class that works as a coordinator for multiple calls to other EJBs that may live on different containers. If I managed the transaction in the SLSB/java class through JTA...any Hibernate Sessions would just attach themselves to that open transaction. So if one of the calls from that SLSB to another EJB caused a RuntimeException within a Session...that RuntimeException would propagate to the transaction that it is apart of and therefore the transaction from the originating SLSB/java object would rollback all Session activities that occurred within that transaction. The same being with CMT. While a Session object attaches itself to a JTA transaction, it is the JTA transaction that makes the true commit to the database/rollback and not the opening/closing of the separate Session objects that are living in each of the EJBs?

Thanks,

-jay


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 29, 2005 12:04 pm 
Regular
Regular

Joined: Tue Nov 30, 2004 4:23 pm
Posts: 62
The scenario I suggested is actually portrayed in this article:

http://www.onjava.com/lpt/a/852

Quote:
...Scenario B: Multiple database access via multiple application servers:

The J2EE architecture allows updates of data at multiple sites to be performed in a single transaction. In the following figure, a client invokes a method on enterprise Bean A. which in turn sends a message to a message queue, updates data in database A. After that, EJB A calls a method in another EJB B deployed in another application server which updates data in database B. The EJB architecture makes it possible to perform the updates to databases A and B in a single transaction...


So as I explained in the previous post, it does not appear that Hibernate should add any additional complexity to this situation. The fact that the JMS call or the EJB B call may open a Session do some updates/inserts/deletions and then close the Session should be seen as the same way a JDBC Connection would be opened, queries ran, and then closed.

So it seems to me that Hibernate does not put any additional requirements onto the scenario of having a single transaction span multiple databases and app servers, any different than JDBC/JTA would require. Is this correct?

Thanks,

-jay


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 29, 2005 12:42 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Yes, as explained in the first paragraph of the Transaction documentation: http://www.hibernate.org/hib_docs/v3/re ... tions.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.