reading further down into that JavaDoc, where it makes quite clear that the
ObjectFactory is responsible for creating objects for References that were
/already bound to a name/, ie. exactly how Hibernate is doing it now.
I have never construed ObjectFactory as having responsibility for creating completely new objects for unbound names.
http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/spi/ObjectFactory.html
"An ObjectFactory is responsible for creating objects of a specific type."
Who else but SessionFactoryObjectFactory, which implements ObjectFactory? Who else is doing a create and bind of a SessionFactory? Tomcat only knows about SessionFactoryObjectFactory and calls it's getObjectInstance().
What should I put for my ResourceParams "factory"? I couldn't find anything and these kinds of questions appear to have gone unanswered before (in the list archives and the forum), which lead to the alternate solutions on the website (e.g. page 114). Instead I modified SessionFactoryObjectFactory to work.
See also: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html#Adding%20Custom%20Resource%20Factories
John Allison [EMAIL PROTECTED]
-------------------------------------------------------
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
-- 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