Werner Guttmann wrote:
All,
following up my own email from yesterday, please note that all issues with Castor JDO in CVS have been resolved.
For the sake of clarity, contrary to what I have been saying, it was possible to build Castor JDO with Ant. Due to some minor issues, the build was only broken for people using IDEs such as Eclipse without wanting to rely on Ant.
I think that this is a perfect time to address some of the issues briefly mentioned below by Bruce in more detail. Whilst we are still working to get the updates pushed to the website, here's a brief overview over what changed. Detailed docs - once pushed out - will be published to the Javadocs, but for the time being please have a look at src/main/org/exolab/castor/jdo/transactionmanager/package.html.
Basically, the way we interface to J2EE/JTS/JTA transaction managers has been completely refactored. Gone are the days where users deploying Castor JDO as part of an EJB deployment unit used JDO.setTransactionManagerName(String) to specify global transaction demarcation. This mechanism will be replaced by two things:
a) specification of the desired <transaction-demarcation> element (incl. sub-information) as part of Castor JDO's main configuration file, jdo-conf.xml. Please note that as part of this change, we have decided to rename the configuration file from database.xml to jdo-conf.xml. In addition, the structure has changed as well as pointed out below.
Here's a short example as taken from src/tests/jdo/mysql.xml that uses LOCAL demarcation, iow all transactions are managed by Castor itself.
<!DOCTYPE jdo-conf PUBLIC "-//EXOLAB/Castor JDO Configuration DTD Version 1.0//EN" "http://castor.exolab.org/jdo-conf.xsd">
<jdo-conf> <database name="mysql" engine="mysql" > <driver url="jdbc:mysql://localhost/castor_tests" class-name="org.gjt.mm.mysql.Driver"> <param name="user" value="test" /> <param name="password" value="test" /> </driver> <mapping href="jdo/mapping.xml" /> </database> <transaction-demarcation mode="local" /> </jdo-conf>
Here's a short sample with GLOBAL demarcation, using Websphere 5 as transaction manager/app server.
<jdo-conf> <database name="mysql" engine="mysql" > <driver url="jdbc:mysql://localhost/castor_tests" class-name="org.gjt.mm.mysql.Driver"> <param name="user" value="test" /> <param name="password" value="test" /> </driver> <mapping href="jdo/mapping.xml" /> </database> <transaction-demarcation mode="global"> <transaction-manager name="websphere5" /> </transaction-demarcation></jdo-conf> </jdo-conf>
b) the specification of all available TransactionManagerFactories in src/main/org/exolab/castor/castor.properties. For the time being, by default this will include the following list:
# # TransactionManagerFactory implementations
# org.exolab.castor.jdo.spi.transactionManagerFactories=\
org.exolab.castor.jdo.transactionmanager.spi.WebSphereTransactionManagerFactory,\
org.exolab.castor.jdo.transactionmanager.spi.WebSphere5TransactionManagerFactory,\
org.exolab.castor.jdo.transactionmanager.spi.LocalTransactionManagerFactory,\
org.exolab.castor.jdo.transactionmanager.spi.JNDIENCTransactionManagerFactory
By definition, it is possible to provide additional (custom) TransactionManagerFactory instances, and I'll be adding some more information on this to the JavaDocs soon.
Having said that, so far we've only been able to test things on Tomcat 4.x and JBoss. Anybody with commercial app servers out there (e.g. WebLogic, Websphere, Websphere 5, etc.), please try this new feature and let us know whether it works for you.
If you happen to have any questions related to this, please let us know by pushing a short email to this mailing list.
Thanks for the clarification, Werner. These changes are pretty important to Castor JDO moving forward. We are also working on getting more docs on these changes available via the website.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
The Castor Project http://www.castor.org/
Apache Geronimo http://incubator.apache.org/projects/geronimo.html
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
