Re: AW: Adding a second data source.

henrydav <[email protected]> Thu, 2 Apr 2009 08:33:14 -0700 (PDT)
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Okay, both responses verify what I thought was true, so thank you for that.
I've tried the approach you mentioned below
(PersistenceBrokerFactory.createPersistenceBroker(new PBKey("myJcdAlias")))=
,
as well as the Spring approach (since this project also mixes Spring 1.2
in):

setJcdAlias("myJcdAlias");
getPersistenceBrokerTemplate();

In both cases, my dataSource is null, which leads me to believe my jcd-alia=
s
isn't mapped up properly in the jdbc-connection-descriptor. I guess what I
don't understand is how the jcd-alias value is resolved. To what does this
attribute directly refer or map?

Thanks for your help, Bernd and Andrei.


Bernd L=C3=A4ngerich wrote:
>=20
> Hi,
>=20
> You can leave your existing connection as default and add a second (named=
)
> connection. You have to specify where to use the second connection by
> using an appropriate method (i.e. for the PB-API
> PersistenceBrokerFactory.createPersistenceBroker(new PBKey(jcdalias)) vs.
> PersistenceBrokerFactory.defaultPersistenceBroker()).
>=20
> Best regards=20
> Bernd
>=20
> -----Urspr=C3=BCngliche Nachricht-----
> Von: henrydav [mailto:[email protected]]=20
> Gesendet: Donnerstag, 2. April 2009 16:38
> An: [email protected]
> Betreff: Adding a second data source.
>=20
>=20
> I'm currently working with a project that uses a single data source, usin=
g
> default-connection=3Dtrue in the jdbc-connection-descriptor. I now need t=
o
> add
> a second data source, but can I leave the first data source as a
> default-connection, or do I need to change it and configure the connectio=
n
> programmatically? I'm fairly new to this and I've been reading OJB
> documentation the past couple of days, but I apologize if I'm leaving out
> requisite information.
> --=20
> View this message in context:
> http://www.nabble.com/Adding-a-second-data-source.-tp22849428p22849428.ht=
ml
> Sent from the Apache DB - ObjectRelationalBridge Users mailing list
> archive at Nabble.com.
>=20
>=20
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>=20
>=20
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>=20
>=20
>=20

--=20
View this message in context: http://www.nabble.com/Adding-a-second-data-so=
urce.-tp22849428p22850281.html
Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive=
 at Nabble.com.