Oh, looking back at your original code, it seems like Tomcat lets you bind a Reference to an ObjectFactory in the webapp.xml. This is tomcat-specific stuff, by the looks.

Oh, now I remember! Tomcat has a read-only JNDI server, doesn't it? That is why you had trouble? Why don't you just get a real JNDI implementation instead?

Gavin King wrote:

Sorry, I simply do not buy that DBCP dynamically instantiates a new datasource when you lookup against an unbound name! There is a connection pool already configured, and a reference already bound to JNDI. Clearly.

AFAIK, the correct behavior if I attempt to lookup() an unbound name is always an exception.


John J. Allison wrote:


But that's exactly what the other ObjectFactorys I've seen do.
The simple Tomcat example starts off with a new statement.
Same with org.apache.commons.dbcp.BasicDataSourceFactory.

And it's the only way I could SessionFactoryObjectFactory get to work.






--
Gavin King
+61 410534454

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to