> 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 j
On 07 Apr (13:04), John J. Allison wrote:
> Well, I'm open to suggestions, but there are alot of people using
> plain old Tomcat and it'd be nice if this stuff just worked with
> Tomcat & Hibernate & JNDI.
Why? The only benefit would be a SessionFactory in JNDI, why do we need
this exactly? It's
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 re
> U ... as per the Hibernate documentation:
>
> new Configuration().configure().buildSessionFactory()
>
> will instantiate a SessionFactory and bind its Reference to JNDI and
> register it with the ObjectFactory.
>
It works by calling "new SessionFactoryImpl" which calls
SessionFactoryObje
Hit the wrong reply and didn't Cc: the list on this.
Of course if this is boring, somebody tell me to shut up.
> 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 refere
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
U ... as per the Hibernate documentation:
new Configuration().configure().buildSessionFactory()
will instantiate a SessionFactory and bind its Reference to JNDI and
register it with the ObjectFactory.
Who else but SessionFactoryObjectFactory, which implements ObjectFactory?
Who else is doin
I'm afraid that I have to say your reading of the JNDI spec is mistaken.
Keep
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'm afraid that I have to say your reading of the JNDI spec is mistaken.
Fair enough, could be.
> Keep
> 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. exac
> Please note that this new code module added added as a part of Middlegen
> 2.1 we are working on at the moment. Its an improvement on the old demo
> application that had an EJB backend that we have supplied with previous
> versions of the tool. Since this is only in CVS it is likely to not be
> This is absolutely correct behavior. SessionFactoryObjectFactory is
> meant to return already-bound session factories.
>
> John J. Allison wrote:
>
> >Poking around, I noticed that SessionFactoryObjectFactory never
> >actually creates a SessionFactory. When getObjectInstance() is
> >called, th
This is absolutely correct behavior. SessionFactoryObjectFactory is
meant to return already-bound session factories.
John J. Allison wrote:
Poking around, I noticed that SessionFactoryObjectFactory never
actually creates a SessionFactory. When getObjectInstance() is
called, that's what Tomcat ex
>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 9:34 AM
Subject: Re: [Hibernate] SessionFactoryObjectFactory (Tomcat & JNDI)
> > How about giving us a hint what was wrong with the existing
> > implementation. No-one else has ever compl
> How about giving us a hint what was wrong with the existing
> implementation. No-one else has ever complained.
Sure, sorry.
The code generated by Middlegen is doing this:
net.sf.hibernate.SessionFactory factory =
(net.sf.hibernate.SessionFactory)ctx.lookup("java:comp/env/AirlineHibernateFac
How about giving us a hint what was wrong with the existing
implementation. No-one else has ever complained.
John J. Allison wrote:
In the process of getting Middlegen's airline sample to work
(sort of, except for Struts), I developed a new SessionFactoryObjectFactory
which actually works with T
In the process of getting Middlegen's airline sample to work
(sort of, except for Struts), I developed a new SessionFactoryObjectFactory
which actually works with Tomcat's JNDI resources. None of the
stuff in the docs or found from google were satisfactory, e.g.
http://www.hibernate.org/114.html
ht
16 matches
Mail list logo