Hi;

 

Since everyone is being so nice about this, even though it's not a shale
problem, I figured I'd ask here.

 

In my hibernate setup, I have a HibernateUtil class with some static
initialization code. That code sets a static final variable with my
SessionFactory.

 

This is a great way to do it because anything that is called in the class,
by definition the SessionFactory has been initialized and can be used. And
the SessionFactory as a static final, I know it won't be changed by
anything.

 

But.

 

I need to pass a different cfg file for test (connect directly) vs tomcat
(connect via JNDI for tomcat pooling). And so I need to set a different
filename. I could make the filename a public static in another class, but
that is not good.

 

So, any ideas?

 

Thanks - dave

 

Reply via email to