RE: [OJB-developers] More JCA
Brought to you by:
thma
From: Matthew B. <ma...@so...> - 2002-04-14 16:41:58
|
Summary: I will be cleaning up the code tonight for another round, this will include proper connection and transaction contract fulfillment including only LocalTransaction Support. I'll need assistance on the XA implementation. No, the issue is related to JCA. Please read the JCA spec section 5.5.4. Especially the part "Connection Sharing and Multiple Connection Handles". Then, for example, try look at the JCA-compliant JDBC wrapper provided with JBoss as an example how to get around the problem. Another approach is to do it after the book. That is, support resource sharing for real. However, this implies supporting and testing all kinds of scenarios such as interleaving of multiple transactions on the same connection, joining of transaction, thread-safety and more. Also, many of the issues are related to XA. For example local transactions have no concept of XID, so it's pretty much impossible to do transaction interleaving here. Resource sharing from a XA point of view is described in the JTA spec section 3.4.6. > Ok, I have the spec and a JCA book I'm using. I'll nail this one. Well, using logical JNDI names is the standard way to access external resources in EJB 2.0. There's also several good reasons why to actual do it. Here's a description how to declare resource references in Jboss: http://www.jboss.org/online-manual/HTML/ch07s02.html Also, not doing this and you might get grilled by unpleasant EJB individuals when the stuff reaches out to the hardcore J2EE community. I actually once got death threats from a J2EE developers when I said that EJB was the perfect anti-pattern. Well, I guess one can't compare this with not using resource references in ejb-jar.xml :-) However, just take it as a hint then. > ok this is just the indirection from using the name I bound the resource too. No problem will add to my example. I don't want any death-threats :) What JCA's did you look at? Commercial JDO product, just looked at the sample ejb. In a managed environment the connection manager of the application server controls the pool. OJB should only create connections when told to do so by the server. > Agree, but wondered about all the calls to new database vs current database. Okay. But, if you could look at the connection related stuff and make sure it is compliant with the spec, that would be nice. Because, it's your code and you know best how the connection handling part of it is supposed to work. > yep, will do. Well, there are several issues around XA, but of course it can be done. However, I'll need to try get some connector stuff running in this Trifork application server first. Thereafter I'll go for the XA stuff, probably in the very near future, say in a couple of weeks. > hopefully the jca piece is portable. Why did you guys choose Trifork? What are the advantages of that application server? However, if you can get a robust JCA version up running with local transactions that would be a major step also! XA it only needed in the more advanced transaction scenarios where several resource adapters are involved. I guess most "normal" people don't need these features right away, but I could be wrong of course. > Yah, XA is advanced, and we will need it in about 6 months. I really want to learn all about it as well, but time is not on my side. What about the non-CCI ODMG factory interface and the BMT stuff we talked about, do you intent to look at this also, or what is your plan? > I'm going to implement the non-CCI ODMG factory as well as the PBroker factory, and the BMT stuff. regards, Matthew |