portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McIntyre, Kevin" <kmcin...@probation.nyc.gov>
Subject RE: RE: Multiple Torque Adapters
Date Thu, 20 Mar 2003 16:58:21 GMT
One last question on Multiple Torque Adapters.  Summing up what I know...

Jetspeed must be the default adapter.
A second adapter can be used but Criteria must specify the adapters name
upon construction.

Here is my last hurdle.  The managers won't work.  The use the default
adapter.

I'm convince that I have to do something during generation.  Any hints/tips
would be helpful.

Kevin


-----Original Message-----
From: McIntyre, Kevin [mailto:kmcintyr@probation.nyc.gov]
Sent: Wednesday, March 19, 2003 5:03 PM
To: 'Jetspeed Users List'
Subject: RE: Multiple Torque Adapters



Well well well...what do you know...what a life-saver.  
I was digging through the Manager and Peer classes (for some kind of set
Method) to no avail.
But by utilizing the Criteria...okay.  Obviously I have a lot to learn.

--Kevin




-----Original Message-----
From: Michael Rothrock [mailto:michael@michaelrothrock.com]
Sent: Wednesday, March 19, 2003 4:35 PM
To: Jetspeed Users List
Subject: Re: Multiple Torque Adapters.


I'm pretty sure that you want
torque.database.default=jetspeed

(I haven't looked at the jetspeed code to see if it assumes that it gets the
default db, but the observed behavior in my installation implies it.)

Because of the installation that I use, with separate stand-alone Torque
directories, my peer classes automatically default to the correct DB.
Therefore, what I'm about to tell you is hypothetical, but seems logical.

I would think that, if you're about to do a query, you could either use
Criteria.setDbName("arts") prior to doing a query with a criteria, or you
could explicitly provide a DBConnection obtained with a named DB (via
BasePeer.beginTransaction("arts") or Torque.getConnection("arts")) to your
doSelect (or whatever).

-- Michael

On 3/19/03 12:54 PM, "McIntyre, Kevin" <kmcintyr@probation.nyc.gov> wrote:

> Here is my torque.properties file.
> 
> Whatever I put in the default breaks the other code, so if I list
jetspeed,
> the portal works fine and
> my "arts" classes don't work.
> 
> If I list "arts" as the default then jetspeed won't work.
> 
> I have to use the "JndiDataSourceFactory" because informix has a problem
> with "TorqueDataSourceFactory"...
> regardless I'm confused how to get both up and working simulatenously.
> 
> 
> ------------------------------------
> 
> torque.applicationRoot = .
> torque.database.default=????
> 
> torque.database.arts.adapter=informix
>
torque.dsfactory.arts.factory=org.apache.torque.dsfactory.JndiDataSourceFact
> ory
> torque.dsfactory.arts.jndi.path=java:comp/env/jdbc/InformixXaDS
> torque.dsfactory.arts.jndi.java.naming.factory.initial =
> org.jnp.interfaces.NamingContextFactory
> torque.dsfactory.arts.jndi.java.naming.factory.url.pkgs =
> org.jboss.naming:org.jnp.interfaces
> 
> torque.database.jetspeed.adapter=mysql
>
torque.dsfactory.jetspeed.factory=org.apache.torque.dsfactory.TorqueDataSour
> ceFactory
> torque.dsfactory.jetspeed.pool.defaultMaxConnections=10
> torque.dsfactory.jetspeed.pool.maxExpiryTime=3600
> torque.dsfactory.jetspeed.pool.connectionWaitTimeout=10
> torque.dsfactory.jetspeed.connection.driver = org.gjt.mm.mysql.Driver
> torque.dsfactory.jetspeed.connection.url =
> jdbc:mysql://10.132.108.179:3306/jetspeed
> torque.dsfactory.jetspeed.connection.user =  [user]
> torque.dsfactory.jetspeed.connection.password = [password]
> 
> torque.database.logInterval=0
> torque.idbroker.cleverquantity=true
> torque.manager.useCache = true
> 
> -----------------------------------------
> 
> 
> -----Original Message-----
> From: Michael Rothrock [mailto:michael@michaelrothrock.com]
> Sent: Wednesday, March 19, 2003 3:37 PM
> To: Jetspeed Users List
> Subject: Re: Multiple Torque Adapters.
> 
> 
> You have to add entries for each of the dbs.  As an example, here are the
> relevant entries from my Torque.properties:
> 
> torque.database.zb_content.adapter=postgresql
> torque.database.lyris.adapter=postgresql
> 
> torque.dsfactory.zb_content.factory=\
> org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
> torque.dsfactory.zb_content.pool.defaultMaxActive=10
> torque.dsfactory.zb_content.pool.testOnBorrow=true
> torque.dsfactory.zb_content.pool.validationQuery=SELECT 1
> torque.dsfactory.zb_content.connection.driver = org.postgresql.Driver
> torque.dsfactory.zb_content.connection.url =
> jdbc:postgresql://localhost/zb_content
> torque.dsfactory.zb_content.connection.user = [user]
> torque.dsfactory.zb_content.connection.password = [password]
> 
> torque.dsfactory.lyris.factory=\
> org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
> torque.dsfactory.lyris.pool.defaultMaxActive=10
> torque.dsfactory.lyris.pool.testOnBorrow=true
> torque.dsfactory.lyris.pool.validationQuery=SELECT 1
> torque.dsfactory.lyris.connection.driver = org.postgresql.Driver
> torque.dsfactory.lyris.connection.url = jdbc:postgresql://localhost/lyris
> torque.dsfactory.lyris.connection.user = [user]
> torque.dsfactory.lyris.connection.password = [password]
> 
> In my case, I maintain two separate torque directories (from the
standalone
> Torque distribution), one for each DB.  I then link the source directory
> from one into the other, and use that as the "master" to compile all of my
> source files, which I then deploy to my jetspeed installation.  I do it
this
> way for a variety of reasons that may not be relevant in your case--ymmv.
> 
> -- Michael
> 
> 
> On 3/19/03 12:08 PM, "McIntyre, Kevin" <kmcintyr@probation.nyc.gov> wrote:
> 
>> 
>> Sorry to ask again, but I'm lost in the woods.
>> 
>> Below shows 2 adapters that work individually in jetspeed when marked as
>> default.
>> 
>> Is there anyway to utilize both in jetspeed?
>> 
>> 
>
----------------------------------------------------------------------------
>> 
>> torque.applicationRoot = .
>> 
>> torque.database.default=db1
>> torque.database.db1.adapter=informix
>> ....
>> ....
>> 
>> torque.database.jetspeed.adapter=mysql
>> ....
>> ....
>> 
>> 
>> 
>> --------------------------------------
>> 
>> 
>> Kevin.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Mime
View raw message