This one time, at band camp, Jakob Praher said:
JP>I've developed a system based on avalon, and have one component for
JP>database persistence like:
JP>
JP>class CastorJDOComponent implements Disposable, ..{
JP> public Database getDatabase( ) { ... }
JP>
JP> public void dispose( ) {
JP>
JP> }
JP>}
JP>
JP>my clients look something like this:
JP>
JP>CastorJDOComponent jdo = (CastorJDOCompnent )myManager.lookup(
JP>"CastorJDOComponent" );
JP>
JP>/* use the jdo here */
JP>
JP>myManager.release( jdo );
JP>
JP>
JP>now I am successfully using the above system, but want to make the best
JP>use out of the CastorJDOCompnent
JP>
JP>If I am right castor internally opens the JDBC connection at
JP> db.begin( )
JP>time and closes it at
JP> db.commit( )
JP>
JP>
JP>should there be an org.exolab.castor.jdo.Database [Database] per VM, as
JP>Connections are internally opened for each transactions or should I
JP>implement some kind of pooling.
JP>
JP>does anybody have experiences of running Castor in a Component Framework
JP>( EJB, ... ).
Jakob,
Depending on the application, there's probably a need for more than
one Database object per VM. Therefore, this is typically alleviated by
telling Castor to make use of a database connection pool (e.g. PoolMan,
DBCP, etc.) via the database descriptor.
There is a first draft of a document about this here:
http://www.castor.org/pooling.html
Remember, it's a first draft, so it's not complete and there is no link
to this document from the Castor website.
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev