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:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to