Has anyone made this work in a container such as Tomcat 4.0? If so, could
you show me an example of your server.xml and web.xml? I am rather new to
this.
InitialContext ctx;
UserTransaction ut;
Database db;
// Lookup databse in JNDI
ctx = new InitialContext();
db = (Database) ctx.lookup( "java:comp/env/jdo/mydb" );
// Begin a transaction
ut = (UserTransaction) ctx.lookup( "java:comp/UserTransaction" );
ut.begin();
// Do something
. . .
// Commit the transaction, close database
ut.commit();
db.close();
Ben Tomasini
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev