tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Hughes <ahhug...@gmail.com>
Subject Re: HowTo Configure hibernate.jndi.url for Tests
Date Wed, 27 Apr 2011 02:51:05 GMT
The use of this is optional from hibernates perspective -  I will be
modifying the code that enforces this from our application (thus making it
optional).

Thanks heaps for your help! :)


On Thu, Apr 21, 2011 at 5:51 PM, Romain Manni-Bucau
<rmannibucau@gmail.com>wrote:

> Hi,
>
> hibernate.jndi.url should contain the "*URL of the JNDI
> provider*(optional)".
>
> - Romain
>
> 2011/4/21 David Blevins <david.blevins@gmail.com>
>
> > On Thu, Apr 21, 2011 at 3:08 AM, Andrew Hughes <ahhughes@gmail.com>
> wrote:
> > > Hi David,
> > >
> > > Thanks for your reply, but I really need a 'hibernate.jndi.url' - our
> > > (inherited) codebase depends on it. I would like to know this at
> compile
> > > time (because the code reads in a property file), but if I really have
> to
> > > (if its even possible) I could programatically look it up from OpenEJB
> > with
> > > a TestNG @BeforeSuite{} and create the properties file before it gets
> > read
> > > in (sounds aweful I know).
> > >
> > > Thanks again, hopefully there is something I can work with here :)
> > > --AH
> >
> > Hi Andrew,
> >
> > My usefulness may have run out then, I'm not sure what that property
> > does.  JNDI of the non "java:comp/env" variety is all non-portable in
> > Java EE 5 and before, so likely its more a question of what exactly
> > does hibernate need from JNDI.
> >
> > Don't have time to research that property, but if you let me know what
> > that property needs to do specifically I might be able to help better.
> >
> >
> > -David
> >
> > >
> > >
> > >
> > > On Thu, Apr 21, 2011 at 12:42 AM, David Blevins <
> david.blevins@gmail.com
> > >wrote:
> > >
> > >>
> > >> On Apr 20, 2011, at 8:15 AM, Andrew Hughes wrote:
> > >>
> > >> > Hi All,
> > >> >
> > >> > The hibernate layer I am trying to test requires a url for the JNDI
> > >> > provider, defined by 'hibernate.jndi.url'.
> > >> >
> > >> > See
> > >> >
> > >>
> >
> http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html#configuration-hibernatejdbc
> > >> > (Table
> > >> > 3.2. Hibernate Datasource Properties).
> > >> >
> > >> > Can I get a jndi provider url from OpenEJB?
> > >>
> > >> Hi Andrew!
> > >>
> > >> When Hibernate is used as the JPA provider we automatically set this
> > >> property:
> > >>
> > >>
> > >>
> >
>  hibernate.transaction.manager_lookup_class=org.apache.openejb.hibernate.TransactionManagerLookup
> > >>
> > >> To use Hibernate as plain Hibernate the same property should work.  I
> > seem
> > >> to recall that the JNDI approach is ultimately just for getting the
> > >> transaction manager via the built-in JndiManagerLookup (or whatever it
> > is
> > >> called). The OpenEJB lookup impl uses a static and will definitely be
> > >> faster.
> > >>
> > >> -David
> > >>
> > >>
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message