You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Dennis Cartier <de...@gmail.com> on 2008/07/29 21:14:40 UTC

Deploying clustered database pools under G2.1.X

Upon trying both 2.1.1 and 2.1.3-SNAPSHOT I have been unable to figure
out how to deploy a clustered database pool. In past versions of
Geronimo the "JDBC Connect URL" field was exposed and for my database
(MySQL) I could directly edit this field to expose the databases to
Geronimo E.g "jdbc:mysql://ServerA,ServerB/MyDatabase?failOverReadOnly=false&autoReconnectForPools=true".

How does one do this under Geronimo 2.1.x? I tried creating a plan
with an added "<config-property-setting name="ConnectionURL">..."
section and deployed it from the command line but get the message:

    Error: Unable to distribute tranql-connector-mysql-local-1.2.rar:
    The plan is trying to set attributes: [ConnectionURL]

I tried this under the Release of 2.1.1 as well as the latest Snapshot
of 2.1.3 and both exhibit this behaviour. I get the impression that
G2.1.x has hidden all the 'complexity' of the constructed JDBC
connection URL behind a subset of fields, but for someone in my
position, this poses a problem.

Thanks,

Dennis

Re: Deploying clustered database pools under G2.1.X

Posted by Dennis Cartier <de...@gmail.com>.
Thanks for the tip on the Generic Tranql adapter. My temporary
workaround was to put the comma separated list of servers into the
server field (E.g. ServerA,ServerB) and append the MySQL parameters
onto the end of the database name (E.g.
MyDatabase?failOverReadOnly=false&autoReconnectForPools=true). This
was based on speculation on my part on how Tranql was assembling the
final JDBC connection URL. It deploys fine, and does work for a single
database, but I have yet to test the failover to make sure both
servers are being used.

As to if this is exposed in the MySQL datasource, it appears that you
can configure these by either appending to the driver URL, by passing
in a key/value pairs in a properties object when making the connection
or by using the set* methods on the java.sql.DataSource  when
implemented by the com.mysql.jdbc.jdbc2.optional.MysqlDataSource or
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource classes.

Hope this helps to clear this up in the future.

Thanks,

Dennis

On Tue, Jul 29, 2008 at 6:20 PM, David Jencks <da...@yahoo.com> wrote:
> Do you know if this can be configured on mysql datasources or just with a
> driver url?  Tranql now has Datasource based mysql adapters which provide
> more checkable configuration for the properties you can set on the
> datasource.  If clustering can be set on the datasource we should look into
> supporting it in tranql.
>
> If not, and meanwhile, you can deploy using the generic tranql adapter
> rather than the mysql specific one, just like you did in geronimo 1.x.  If
> you are using the console wizard just don't say you are using mysql -- I
> think there's an "other" -- and it should use the generic adapter.
>
> hope this helps
> david jencks
>
>
>
> On Jul 29, 2008, at 12:14 PM, Dennis Cartier wrote:
>
>> Upon trying both 2.1.1 and 2.1.3-SNAPSHOT I have been unable to figure
>> out how to deploy a clustered database pool. In past versions of
>> Geronimo the "JDBC Connect URL" field was exposed and for my database
>> (MySQL) I could directly edit this field to expose the databases to
>> Geronimo E.g
>> "jdbc:mysql://ServerA,ServerB/MyDatabase?failOverReadOnly=false&autoReconnectForPools=true".
>>
>> How does one do this under Geronimo 2.1.x? I tried creating a plan
>> with an added "<config-property-setting name="ConnectionURL">..."
>> section and deployed it from the command line but get the message:
>>
>>   Error: Unable to distribute tranql-connector-mysql-local-1.2.rar:
>>   The plan is trying to set attributes: [ConnectionURL]
>>
>> I tried this under the Release of 2.1.1 as well as the latest Snapshot
>> of 2.1.3 and both exhibit this behaviour. I get the impression that
>> G2.1.x has hidden all the 'complexity' of the constructed JDBC
>> connection URL behind a subset of fields, but for someone in my
>> position, this poses a problem.
>>
>> Thanks,
>>
>> Dennis
>
>



-- 
"It is impossible to design fool proof systems, because fools are so clever."

Authour unknown
--

"The music business is a cruel and shallow money trench, a long
plastic hallway where thieves and pimps run free, and good men die
like dogs. There's also a negative side. "

Hunter S. Thompson, US journalist (1939 – 2005)

Re: Deploying clustered database pools under G2.1.X

Posted by David Jencks <da...@yahoo.com>.
Do you know if this can be configured on mysql datasources or just  
with a driver url?  Tranql now has Datasource based mysql adapters  
which provide more checkable configuration for the properties you can  
set on the datasource.  If clustering can be set on the datasource we  
should look into supporting it in tranql.

If not, and meanwhile, you can deploy using the generic tranql adapter  
rather than the mysql specific one, just like you did in geronimo  
1.x.  If you are using the console wizard just don't say you are using  
mysql -- I think there's an "other" -- and it should use the generic  
adapter.

hope this helps
david jencks



On Jul 29, 2008, at 12:14 PM, Dennis Cartier wrote:

> Upon trying both 2.1.1 and 2.1.3-SNAPSHOT I have been unable to figure
> out how to deploy a clustered database pool. In past versions of
> Geronimo the "JDBC Connect URL" field was exposed and for my database
> (MySQL) I could directly edit this field to expose the databases to
> Geronimo E.g "jdbc:mysql://ServerA,ServerB/MyDatabase? 
> failOverReadOnly=false&autoReconnectForPools=true".
>
> How does one do this under Geronimo 2.1.x? I tried creating a plan
> with an added "<config-property-setting name="ConnectionURL">..."
> section and deployed it from the command line but get the message:
>
>    Error: Unable to distribute tranql-connector-mysql-local-1.2.rar:
>    The plan is trying to set attributes: [ConnectionURL]
>
> I tried this under the Release of 2.1.1 as well as the latest Snapshot
> of 2.1.3 and both exhibit this behaviour. I get the impression that
> G2.1.x has hidden all the 'complexity' of the constructed JDBC
> connection URL behind a subset of fields, but for someone in my
> position, this poses a problem.
>
> Thanks,
>
> Dennis