Glassfish datasource configuration

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Glassfish datasource configuration

butkovic
Hi all, 

I'd like to setup glassfish datasource using cargo, using DatasourceClassname rather than Driver. 


it should be possile. 

However I did not figure out how the cargo maven plugin config should look like. 
Would you mind prviding an example for me (or pointing me to existing one)?

Thanks

Peter Butkovic 
Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

S. Ali Tokmen
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:

> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

butkovic
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

butkovic
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

S. Ali Tokmen
Hi Peter

The table in http://cargo.codehaus.org/DataSource+and+Resource+Support#DataSourceandResourceSupport-DataSourceproperties indicates it would be enough for you to add cargo.datasource.type into the datasource parameters.

Could you check?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 23/01/14 13:48, [hidden email] wrote:
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

butkovic
Hi Ali,

thanks for reply. Your suggestion worked!

Just for the reference, the following config:
<cargo.datasource.datasource.realds>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/realds|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa
                    </cargo.datasource.datasource.realds>

generated:
<jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource" res-type="java.sql.Driver" name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

Still there are issues I didn't overcome yet.

I'd like to achieve something like this:

<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6DataSource" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
      <property name="realdatasource" value="jdbc/realds"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-p6spy" jndi-name="jdbc/p6spy"></jdbc-resource>

(please note the non-standard property called: realdatasource).

I tried:
<cargo.datasource.datasource.p6spy>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/p6spy|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa|
                      cargo.datasource.realdatasource=jdbc/realds
                    </cargo.datasource.datasource.p6spy>

still the property is missing in my generated datasource definition.

Is there a way to achieve it with cargo?

Thanks.

Peter Butkovic




On Thu, Jan 23, 2014 at 10:15 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

The table in http://cargo.codehaus.org/DataSource+and+Resource+Support#DataSourceandResourceSupport-DataSourceproperties indicates it would be enough for you to add cargo.datasource.type into the datasource parameters.

Could you check?


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 23/01/14 13:48, [hidden email] wrote:
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

S. Ali Tokmen
Hi Peter

For the extra property, if you can tell how to deploy it using the asadmin's create-jdbc-connection-pool command then we can add it to CARGO too.

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 24/01/14 09:44, [hidden email] wrote:
Hi Ali,

thanks for reply. Your suggestion worked!

Just for the reference, the following config:
<cargo.datasource.datasource.realds>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/realds|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa
                    </cargo.datasource.datasource.realds>

generated:
<jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource" res-type="java.sql.Driver" name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

Still there are issues I didn't overcome yet.

I'd like to achieve something like this:

<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6DataSource" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
      <property name="realdatasource" value="jdbc/realds"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-p6spy" jndi-name="jdbc/p6spy"></jdbc-resource>

(please note the non-standard property called: realdatasource).

I tried:
<cargo.datasource.datasource.p6spy>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/p6spy|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa|
                      cargo.datasource.realdatasource=jdbc/realds
                    </cargo.datasource.datasource.p6spy>

still the property is missing in my generated datasource definition.

Is there a way to achieve it with cargo?

Thanks.

Peter Butkovic




On Thu, Jan 23, 2014 at 10:15 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

The table in http://cargo.codehaus.org/DataSource+and+Resource+Support#DataSourceandResourceSupport-DataSourceproperties indicates it would be enough for you to add cargo.datasource.type into the datasource parameters.

Could you check?


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 23/01/14 13:48, [hidden email] wrote:
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email







Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

butkovic
comming to this one after a while. Seems to be quite easy with glassfish's asadmin command.

well, so imagine standard command would be:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test" PostgresPoolTest

resulting in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>


to add special property, let's say called: realdatasourcename, just append it to --properties in a common format like this:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test":realdatasourcename=PostgresPool PostgresPoolTest

which results in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="realdatasourcename" value="PostgresPool"></property>
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>

It would be great if you guys would provide support for this in cargo. Moreover once implemented, I'd be interested how I can add such a property/properties to my cargo maven configuration.
Thanks!



On Sat, Jan 25, 2014 at 4:02 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

For the extra property, if you can tell how to deploy it using the asadmin's create-jdbc-connection-pool command then we can add it to CARGO too.


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 24/01/14 09:44, [hidden email] wrote:
Hi Ali,

thanks for reply. Your suggestion worked!

Just for the reference, the following config:
<cargo.datasource.datasource.realds>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/realds|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa
                    </cargo.datasource.datasource.realds>

generated:
<jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource" res-type="java.sql.Driver" name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

Still there are issues I didn't overcome yet.

I'd like to achieve something like this:

<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6DataSource" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
      <property name="realdatasource" value="jdbc/realds"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-p6spy" jndi-name="jdbc/p6spy"></jdbc-resource>

(please note the non-standard property called: realdatasource).

I tried:
<cargo.datasource.datasource.p6spy>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/p6spy|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa|
                      cargo.datasource.realdatasource=jdbc/realds
                    </cargo.datasource.datasource.p6spy>

still the property is missing in my generated datasource definition.

Is there a way to achieve it with cargo?

Thanks.

Peter Butkovic




On Thu, Jan 23, 2014 at 10:15 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

The table in http://cargo.codehaus.org/DataSource+and+Resource+Support#DataSourceandResourceSupport-DataSourceproperties indicates it would be enough for you to add cargo.datasource.type into the datasource parameters.

Could you check?


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 23/01/14 13:48, [hidden email] wrote:
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email








Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

S. Ali Tokmen
Hi Peter

Thanks for the details.

I assume we can add as many properties as we like, by simply putting : separators in between, correct?

Best regards

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 12/02/14 12:31, [hidden email] wrote:
comming to this one after a while. Seems to be quite easy with glassfish's asadmin command.

well, so imagine standard command would be:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test" PostgresPoolTest

resulting in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>


to add special property, let's say called: realdatasourcename, just append it to --properties in a common format like this:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test":realdatasourcename=PostgresPool PostgresPoolTest

which results in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="realdatasourcename" value="PostgresPool"></property>
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>

It would be great if you guys would provide support for this in cargo. Moreover once implemented, I'd be interested how I can add such a property/properties to my cargo maven configuration.
Thanks!



On Sat, Jan 25, 2014 at 4:02 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

For the extra property, if you can tell how to deploy it using the asadmin's create-jdbc-connection-pool command then we can add it to CARGO too.


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 24/01/14 09:44, [hidden email] wrote:
Hi Ali,

thanks for reply. Your suggestion worked!

Just for the reference, the following config:
<cargo.datasource.datasource.realds>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/realds|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa
                    </cargo.datasource.datasource.realds>

generated:
<jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource" res-type="java.sql.Driver" name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

Still there are issues I didn't overcome yet.

I'd like to achieve something like this:

<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6DataSource" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
      <property name="realdatasource" value="jdbc/realds"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-p6spy" jndi-name="jdbc/p6spy"></jdbc-resource>

(please note the non-standard property called: realdatasource).

I tried:
<cargo.datasource.datasource.p6spy>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/p6spy|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa|
                      cargo.datasource.realdatasource=jdbc/realds
                    </cargo.datasource.datasource.p6spy>

still the property is missing in my generated datasource definition.

Is there a way to achieve it with cargo?

Thanks.

Peter Butkovic




On Thu, Jan 23, 2014 at 10:15 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

The table in http://cargo.codehaus.org/DataSource+and+Resource+Support#DataSourceandResourceSupport-DataSourceproperties indicates it would be enough for you to add cargo.datasource.type into the datasource parameters.

Could you check?


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 23/01/14 13:48, [hidden email] wrote:
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email









Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

butkovic
Hi,

yes, it seems to be the case. as I added some random property in my test only.


On Wed, Feb 12, 2014 at 5:54 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Thanks for the details.

I assume we can add as many properties as we like, by simply putting : separators in between, correct?

Best regards


S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 12/02/14 12:31, [hidden email] wrote:
comming to this one after a while. Seems to be quite easy with glassfish's asadmin command.

well, so imagine standard command would be:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test" PostgresPoolTest

resulting in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>


to add special property, let's say called: realdatasourcename, just append it to --properties in a common format like this:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test":realdatasourcename=PostgresPool PostgresPoolTest

which results in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="realdatasourcename" value="PostgresPool"></property>
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>

It would be great if you guys would provide support for this in cargo. Moreover once implemented, I'd be interested how I can add such a property/properties to my cargo maven configuration.
Thanks!



On Sat, Jan 25, 2014 at 4:02 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

For the extra property, if you can tell how to deploy it using the asadmin's create-jdbc-connection-pool command then we can add it to CARGO too.


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 24/01/14 09:44, [hidden email] wrote:
Hi Ali,

thanks for reply. Your suggestion worked!

Just for the reference, the following config:
<cargo.datasource.datasource.realds>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/realds|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa
                    </cargo.datasource.datasource.realds>

generated:
<jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource" res-type="java.sql.Driver" name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

Still there are issues I didn't overcome yet.

I'd like to achieve something like this:

<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6DataSource" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
      <property name="realdatasource" value="jdbc/realds"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-p6spy" jndi-name="jdbc/p6spy"></jdbc-resource>

(please note the non-standard property called: realdatasource).

I tried:
<cargo.datasource.datasource.p6spy>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/p6spy|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa|
                      cargo.datasource.realdatasource=jdbc/realds
                    </cargo.datasource.datasource.p6spy>

still the property is missing in my generated datasource definition.

Is there a way to achieve it with cargo?

Thanks.

Peter Butkovic




On Thu, Jan 23, 2014 at 10:15 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

The table in http://cargo.codehaus.org/DataSource+and+Resource+Support#DataSourceandResourceSupport-DataSourceproperties indicates it would be enough for you to add cargo.datasource.type into the datasource parameters.

Could you check?


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 23/01/14 13:48, [hidden email] wrote:
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email










Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

S. Ali Tokmen
Hi Peter

Should be OK now - implementation of https://jira.codehaus.org/browse/CARGO-1258 is OK, hopefully you can try with the 1.4.8-SNAPSHOT version in 24 hours.

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 12/02/14 20:11, [hidden email] wrote:
Hi,

yes, it seems to be the case. as I added some random property in my test only.


On Wed, Feb 12, 2014 at 5:54 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Thanks for the details.

I assume we can add as many properties as we like, by simply putting : separators in between, correct?

Best regards


S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 12/02/14 12:31, [hidden email] wrote:
comming to this one after a while. Seems to be quite easy with glassfish's asadmin command.

well, so imagine standard command would be:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test" PostgresPoolTest

resulting in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>


to add special property, let's say called: realdatasourcename, just append it to --properties in a common format like this:

asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property User=postgres:Password=postgres:URL="jdbc\:postgresql\://localhost/test":realdatasourcename=PostgresPool PostgresPoolTest

which results in:

 <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGConnectionPoolDataSource" name="PostgresPoolTest">
      <property name="realdatasourcename" value="PostgresPool"></property>
      <property name="URL" value="jdbc:postgresql://localhost/test"></property>
      <property name="User" value="postgres"></property>
      <property name="Password" value="postgres"></property>
    </jdbc-connection-pool>

It would be great if you guys would provide support for this in cargo. Moreover once implemented, I'd be interested how I can add such a property/properties to my cargo maven configuration.
Thanks!



On Sat, Jan 25, 2014 at 4:02 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

For the extra property, if you can tell how to deploy it using the asadmin's create-jdbc-connection-pool command then we can add it to CARGO too.


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 24/01/14 09:44, [hidden email] wrote:
Hi Ali,

thanks for reply. Your suggestion worked!

Just for the reference, the following config:
<cargo.datasource.datasource.realds>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/realds|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa
                    </cargo.datasource.datasource.realds>

generated:
<jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource" res-type="java.sql.Driver" name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

Still there are issues I didn't overcome yet.

I'd like to achieve something like this:

<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6DataSource" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
      <property name="realdatasource" value="jdbc/realds"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-p6spy" jndi-name="jdbc/p6spy"></jdbc-resource>

(please note the non-standard property called: realdatasource).

I tried:
<cargo.datasource.datasource.p6spy>
                        cargo.datasource.type=javax.sql.DataSource
                      cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/p6spy|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa|
                      cargo.datasource.realdatasource=jdbc/realds
                    </cargo.datasource.datasource.p6spy>

still the property is missing in my generated datasource definition.

Is there a way to achieve it with cargo?

Thanks.

Peter Butkovic




On Thu, Jan 23, 2014 at 10:15 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

The table in http://cargo.codehaus.org/DataSource+and+Resource+Support#DataSourceandResourceSupport-DataSourceproperties indicates it would be enough for you to add cargo.datasource.type into the datasource parameters.

Could you check?


Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com
On 23/01/14 13:48, [hidden email] wrote:
Hi,

I guess I was too enthusiastic before. I'm stuck here I think.

I'm running Glassfish 3.1.2.2 with cargo maven plugin (1.4.6)

So this works OK:
 <configuration>
              <properties>
                 <cargo.datasource.datasource.p6spy>
                  cargo.datasource.driver=com.p6spy.engine.spy.P6SpyDriver|
                  cargo.datasource.url=jdbc:p6spy:h2:mem:p6spy|
                  cargo.datasource.jndi=jdbc/p6spy|
                  cargo.datasource.username=sa|
                  cargo.datasource.password=sa
                </cargo.datasource.datasource.p6spy>
              </properties>
            </configuration>

generating in the domain.xml following:
<jdbc-connection-pool driver-classname="com.p6spy.engine.spy.P6SpyDriver" res-type="java.sql.Driver" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>


However I'd like to achieve something like this:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.ConnectionPoolDataSource" name="cargo-datasource-p6spy">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:p6spy:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>

No Idea how that should be done. I checked the referred site, so does it mean, that for Glassfish there is no such support available in cargo? If there is, can you guys provide me an example of such maven config?

Thanks a lot.

Peter Butkovic


On Fri, Jan 17, 2014 at 9:19 PM, <[hidden email]> wrote:
Hi,

thanks! That's what I've been looking for.
I didn't notice example there :)

Peter Butkovic


On Fri, Jan 17, 2014 at 8:06 PM, S. Ali Tokmen <[hidden email]> wrote:
Hi Peter

Did you look at the details of
http://cargo.codehaus.org/DataSource+and+Resource+Support ?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 16/01/14 20:27, [hidden email] wrote:
> Hi all,
>
> I'd like to setup glassfish datasource using cargo, using
> DatasourceClassname rather than Driver.
>
> Based on this this bug
> report: https://jira.codehaus.org/browse/CARGO-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> it should be possile.
>
> However I did not figure out how the cargo maven plugin config should
> look like.
> Would you mind prviding an example for me (or pointing me to existing
> one)?
>
> Thanks
>
> Peter Butkovic


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email











Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

butkovic
Hi,

thanks for reply, once I checked the generated config agian, I had to go one step back (I didn't notice that generated output didn't meet my expectations).

This is my expectation:
<jdbc-connection-pool datasource-classname="com.p6spy.engine.spy.P6DataSource" res-type="javax.sql.DataSource"
name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

but this is what I got:
<jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource" res-type="java.sql.Driver" name="cargo-datasource-realds">
      <property name="user" value="sa"></property>
      <property name="url" value="jdbc:h2:mem:p6spy"></property>
      <property name="password" value="sa"></property>
    </jdbc-connection-pool>
    <jdbc-resource pool-name="cargo-datasource-realds" jndi-name="jdbc/realds"></jdbc-resource>

Please note the difference in the jdbc-connection-pool attributes.

from:

<cargo.datasource.datasource.p6spy>
                        cargo.datasource.type=javax.sql.DataSource|
                      cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
                      cargo.datasource.url=jdbc:h2:mem:p6spy|
                      cargo.datasource.jndi=jdbc/p6spy|
                      cargo.datasource.username=sa|
                      cargo.datasource.password=sa
                    </cargo.datasource.datasource.p6spy>

Does cargo does not support generating that?
If it does, how should my maven property look like?
Thanks.


Reply | Threaded
Open this post in threaded view
|

Re: Glassfish datasource configuration

S. Ali Tokmen
Hi Peter

I think the way it is implemented now, CARGO doesn't support these two
features on GlassFish; i.e. datasource-classname and res-type...

Perhaps you can open a JIRA entry for it?

THank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 14/02/14 22:09, [hidden email] wrote:

> Hi,
>
> thanks for reply, once I checked the generated config agian, I had to
> go one step back (I didn't notice that generated output didn't meet my
> expectations).
>
> This is my expectation:
> <jdbc-connection-pool
> datasource-classname="com.p6spy.engine.spy.P6DataSource"
> res-type="javax.sql.DataSource"
> name="cargo-datasource-realds">
>       <property name="user" value="sa"></property>
>       <property name="url" value="jdbc:h2:mem:p6spy"></property>
>       <property name="password" value="sa"></property>
>     </jdbc-connection-pool>
>     <jdbc-resource pool-name="cargo-datasource-realds"
> jndi-name="jdbc/realds"></jdbc-resource>
>
> but this is what I got:
> <jdbc-connection-pool driver-classname="org.h2.jdbcx.JdbcDataSource"
> res-type="java.sql.Driver" name="cargo-datasource-realds">
>       <property name="user" value="sa"></property>
>       <property name="url" value="jdbc:h2:mem:p6spy"></property>
>       <property name="password" value="sa"></property>
>     </jdbc-connection-pool>
>     <jdbc-resource pool-name="cargo-datasource-realds"
> jndi-name="jdbc/realds"></jdbc-resource>
>
> Please note the difference in the jdbc-connection-pool attributes.
>
> from:
>
> <cargo.datasource.datasource.p6spy>
>                         cargo.datasource.type=javax.sql.DataSource|
>                      
> cargo.datasource.driver=com.p6spy.engine.spy.P6DataSource|
>                       cargo.datasource.url=jdbc:h2:mem:p6spy|
>                       cargo.datasource.jndi=jdbc/p6spy|
>                       cargo.datasource.username=sa|
>                       cargo.datasource.password=sa
>                     </cargo.datasource.datasource.p6spy>
>
> Does cargo does not support generating that?
> If it does, how should my maven property look like?
> Thanks.
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email