You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Rui Pacheco <ru...@gmail.com> on 2006/09/15 16:31:52 UTC
Opening several database connections on the same registry
Hi all
Can you help me with my hivemind registry? I'm trying to configure several
connection pools to the same server, only the database name changes. When I
had one pool, this worked like a charm, now that I have several Tapestry is
complaining about the creation of the ASO. I think this is my syntax that.
Could you give me a hand finding out whats wrong?
The xml is below:
<?xml version="1.0"?>
<module id="dbcp" version="1.0.0">
<service-point id="GeneralPool" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName" value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/Universal?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="DicIP" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName" value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/DicIP?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="DicPI" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName" value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/DicPI?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="DicPP" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName" value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/DicPP?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="User" scope="session">
<create-instance class="pt.te.universal.agc.backend.models.User
"/>
</state-object>
</contribution>
<contribution configuration-id="tapestry.url.ServiceEncoders">
<page-service-encoder id="page" extension="html" service="page"/>
</contribution>
<contribution configuration-id="tapestry.url.ServiceEncoders">
<extension-encoder id="extension" extension="do" after="*"/>
</contribution>
</module>
--
Cumprimentos,
Rui Pacheco
Re: Opening several database connections on the same registry
Posted by Rui Pacheco <ru...@gmail.com>.
Hi
I've managed to fix it. It was just a dumb typo, a mistake on my part. But
when you're looking at XML, it gets hard to see whats happening. :)
On 9/19/06, Kristian Marinkovic <kr...@porsche.co.at> wrote:
>
> Hi,
>
> could you post the exception.
>
> Is there a object with a "object.setDataSource(javax.sql.DataSource ds)"
> method?
>
> if so hivemind won't be able to resolve the right object because there are
> 3 objects with
> the same interface available. you will have to specify the desired pool by
> its service-point id.
> If you have only one pool you don't have to specify it :)
>
> g,
> kris
>
>
>
>
> "Rui Pacheco"
> <rui.pacheco@gmai
> l.com> An
> "Tapestry users"
> 15.09.2006 16:31 <us...@tapestry.apache.org>,
> "Tapestry users"
> <ta...@jakarta.apache.org>
> Bitte antworten Kopie
> an
> "Tapestry users" Thema
> <users@tapestry.a Opening several database
> pache.org> connections on the same registry
>
>
>
>
>
>
>
>
>
>
> Hi all
>
> Can you help me with my hivemind registry? I'm trying to configure several
> connection pools to the same server, only the database name changes. When
> I
> had one pool, this worked like a charm, now that I have several Tapestry
> is
> complaining about the creation of the ASO. I think this is my syntax that.
> Could you give me a hand finding out whats wrong?
>
> The xml is below:
>
> <?xml version="1.0"?>
> <module id="dbcp" version="1.0.0">
>
> <service-point id="GeneralPool" interface="javax.sql.DataSource">
> <invoke-factory>
> <construct class="org.apache.commons.dbcp.BasicDataSource">
> <set property="driverClassName"
> value="com.mysql.jdbc.Driver
> "/>
> <set property="url"
>
> value="jdbc:mysql://localhost/Universal?zeroDateTimeBehavior=convertToNull"/>
>
> <set property="username" value="webmaster"/>
> <set property="password" value="webmaster"/>
> <set property="removeAbandoned" value="true"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <service-point id="DicIP" interface="javax.sql.DataSource">
> <invoke-factory>
> <construct class="org.apache.commons.dbcp.BasicDataSource">
> <set property="driverClassName"
> value="com.mysql.jdbc.Driver
> "/>
> <set property="url"
> value="jdbc:mysql://localhost/DicIP?zeroDateTimeBehavior=convertToNull"/>
> <set property="username" value="webmaster"/>
> <set property="password" value="webmaster"/>
> <set property="removeAbandoned" value="true"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <service-point id="DicPI" interface="javax.sql.DataSource">
> <invoke-factory>
> <construct class="org.apache.commons.dbcp.BasicDataSource">
> <set property="driverClassName"
> value="com.mysql.jdbc.Driver
> "/>
> <set property="url"
> value="jdbc:mysql://localhost/DicPI?zeroDateTimeBehavior=convertToNull"/>
> <set property="username" value="webmaster"/>
> <set property="password" value="webmaster"/>
> <set property="removeAbandoned" value="true"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <service-point id="DicPP" interface="javax.sql.DataSource">
> <invoke-factory>
> <construct class="org.apache.commons.dbcp.BasicDataSource">
> <set property="driverClassName"
> value="com.mysql.jdbc.Driver
> "/>
> <set property="url"
> value="jdbc:mysql://localhost/DicPP?zeroDateTimeBehavior=convertToNull"/>
> <set property="username" value="webmaster"/>
> <set property="password" value="webmaster"/>
> <set property="removeAbandoned" value="true"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <contribution configuration-id="tapestry.state.ApplicationObjects">
> <state-object name="User" scope="session">
> <create-instance class="
> pt.te.universal.agc.backend.models.User
> "/>
> </state-object>
> </contribution>
>
> <contribution configuration-id="tapestry.url.ServiceEncoders">
> <page-service-encoder id="page" extension="html" service="page"/>
> </contribution>
>
> <contribution configuration-id="tapestry.url.ServiceEncoders">
> <extension-encoder id="extension" extension="do" after="*"/>
> </contribution>
> </module>
>
> --
> Cumprimentos,
> Rui Pacheco
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Cumprimentos,
Rui Pacheco
RE: Opening several database connections on the same registry
Posted by Kristian Marinkovic <kr...@porsche.co.at>.
Hi,
could you post the exception.
Is there a object with a "object.setDataSource(javax.sql.DataSource ds)"
method?
if so hivemind won't be able to resolve the right object because there are
3 objects with
the same interface available. you will have to specify the desired pool by
its service-point id.
If you have only one pool you don't have to specify it :)
g,
kris
"Rui Pacheco"
<rui.pacheco@gmai
l.com> An
"Tapestry users"
15.09.2006 16:31 <us...@tapestry.apache.org>,
"Tapestry users"
<ta...@jakarta.apache.org>
Bitte antworten Kopie
an
"Tapestry users" Thema
<users@tapestry.a Opening several database
pache.org> connections on the same registry
Hi all
Can you help me with my hivemind registry? I'm trying to configure several
connection pools to the same server, only the database name changes. When I
had one pool, this worked like a charm, now that I have several Tapestry is
complaining about the creation of the ASO. I think this is my syntax that.
Could you give me a hand finding out whats wrong?
The xml is below:
<?xml version="1.0"?>
<module id="dbcp" version="1.0.0">
<service-point id="GeneralPool" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName"
value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/Universal?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="DicIP" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName"
value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/DicIP?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="DicPI" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName"
value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/DicPI?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="DicPP" interface="javax.sql.DataSource">
<invoke-factory>
<construct class="org.apache.commons.dbcp.BasicDataSource">
<set property="driverClassName"
value="com.mysql.jdbc.Driver
"/>
<set property="url"
value="jdbc:mysql://localhost/DicPP?zeroDateTimeBehavior=convertToNull"/>
<set property="username" value="webmaster"/>
<set property="password" value="webmaster"/>
<set property="removeAbandoned" value="true"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="User" scope="session">
<create-instance class="pt.te.universal.agc.backend.models.User
"/>
</state-object>
</contribution>
<contribution configuration-id="tapestry.url.ServiceEncoders">
<page-service-encoder id="page" extension="html" service="page"/>
</contribution>
<contribution configuration-id="tapestry.url.ServiceEncoders">
<extension-encoder id="extension" extension="do" after="*"/>
</contribution>
</module>
--
Cumprimentos,
Rui Pacheco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org