db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject RE: Setting a ConnectionFactory instance instead of configuring a class in OJB.properties
Date Wed, 23 Mar 2005 07:12:01 GMT
Hi Armin,

I would like to set an instance of a connection factory, not the class.
E.g.

ConnectionFactory cf = new MyConnectionFactory(a, b, c, null);
someOJBInterface.setConnectionFactory(cf);
...

So that I can pass my own data to the constructor of the connection
factory. Otherwise I'll have to make a, b, and c available static
somewhere (I'd rather like passing the values to the constructor).

Thanks,
Bart.

> -----Original Message-----
> From: Armin Waibel [mailto:arminw@apache.org]
> Sent: Tuesday, March 22, 2005 9:33 PM
> To: OJB Developers List
> Subject: Re: Setting a ConnectionFactory instance instead of
configuring a
> class in OJB.properties
> 
> 
> 
> Bart Molenkamp wrote:
> > Hi,
> >
> > Is is possible to set a ConnectionFactory at runtime instead of
defining
> > a class in OJB.properties? I need to create the ConnectionFactory
> > instance myself, and then need to tell OJB that it should use that
> > connection factory.
> >
> 
> Never tried this before. Should be possible if you call
> 
> fac = ConnectionFactoryFactory.getInstance();
> // this override the class set by OJB.properties
> fac.setClassToServe(factory);
> 
> before the first PB instance is created.
> 
> regards,
> Armin
> 
> 
> > Thanks,
> > Bart.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-dev-help@db.apache.org
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message