You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "Howard W. Smith, Jr." <sm...@gmail.com> on 2013/11/02 14:49:44 UTC

HA-JDBC via tomee.xml properties ignored

I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
databases. As per documentation and forum discussion, I have the following:

--- tomee.xml ---

<Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
  factory="net.sf.hajdbc.sql.DataSourceFactory"
  cluster="cluster"
  UserName ....
  Password ...
  JtaManaged true
  jmxEnabled true
  LogSql false
</Resource>

--- ha-jdbc-cluster.xml ---

<?xml version="1.0" encoding="UTF-8"?>
<ha-jdbc xmlns="urn:ha-jdbc:cluster:2.1">
    <sync id="full">
       <property name="fetchSize">1000</property>
    </sync>
    <sync id="diff">
       <property name="fetchSize">1000</property>
       <property name="versionPattern">version</property>
    </sync>
    <state id="simple"/>
    <cluster dialect="derby" balancer="simple" default-sync="full"
meta-data-cache="lazy" transaction-mode="parallel">
        <database id="db1" weight="1"
location="org.apache.tomcat.jdbc.pool.DataSource">
            <user>...</user>
            <password>...</password>
            <property name="serverName">mcms</property>
            <property name="databaseName">mcms</property>
            <property
name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
            <property
name="url">jdbc:derby:c:/javadb/databases/mcms;create=true</property>
            <property name="InitialSize">10</property>
            <property name="MaxActive">100</property>
            <property name="MaxIdle">30</property>
            <property name="MaxWait">10000</property>
            <property name="minIdle">10</property>
            <property name="suspectTimeout">60</property>
            <property name="removeAbandoned">true</property>
            <property name="removeAbandonedTimeout">180</property>
            <property name="timeBetweenEvictionRunsMillis">30000</property>
            <property
name="jdbcInterceptors">StatementCache(max=128)</property>
        </database>
        <database id="db2" weight="2"
location="org.apache.tomcat.jdbc.pool.DataSource">
            <user>...</user>
            <password>...</password>
            <property name="serverName">mcms</property>
            <property name="databaseName">mcms</property>
            <property
name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
            <property
name="url">jdbc:derby:c:/javadb/databases/mcmsdev;create=true</property>
            <property name="InitialSize">10</property>
            <property name="MaxActive">100</property>
            <property name="MaxIdle">30</property>
            <property name="MaxWait">10000</property>
            <property name="minIdle">10</property>
            <property name="suspectTimeout">60</property>
            <property name="removeAbandoned">true</property>
            <property name="removeAbandonedTimeout">180</property>
            <property name="timeBetweenEvictionRunsMillis">30000</property>
            <property
name="jdbcInterceptors">StatementCache(max=128)</property>
        </database>
    </cluster>
</ha-jdbc>


which results in the following in the log:


INFO: Creating Resource(id=jdbc/mcmsJta)

Nov 02, 2013 9:15:03 AM
org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource readOnly
INFO: Disabling testOnBorrow since no validation query is provided

Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
logUnusedProperties
WARNING: Property "factory" not supported by "jdbc/mcmsJta"

Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
logUnusedProperties
WARNING: Property "cluster" not supported by "jdbc/mcmsJta"

Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
createRecipe


now, my app is not connecting to my database, and it is trying to use
default database connection (hsqldb, which is probably the non-jta database
which is configured automatically by tomee, if/when 'no' non-jta database
is configured/specified in tomee.xml via <Resource ... />.

Should I move the <Resource .../> from tomee.xml to (webapp)
META-INF/context.xml as recommended here[2]?


[1] http://ha-jdbc.github.io/
[2] https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/4707f208/

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
i like to do a lot of research and reading and trial-and-error, so HA-JDBC
fell in that category for me. honestly, i don't need it, and I remember
others expressing their concerns about avoid clustering, if not necessary.
this case, cluster of databases would definitely slow down my app. my app
is already 'highly available' to meet requirements.

i'm sure I can do more tuning of database, database access, and some (more)
caching to improve database-access performance in my app. i do not have a
need for replication at all...right now.

On Tue, Nov 5, 2013 at 12:08 AM, Howard W. Smith, Jr. <
smithh032772@gmail.com> wrote:

> FYI/followup,
>
> On Sat, Nov 2, 2013 at 9:49 AM, Howard W. Smith, Jr. <
> smithh032772@gmail.com> wrote:
>
>> I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
>> databases.
>
>
> I had to do the following to ensure tomee would create the ha-jdbc
> resource:
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
Well, they have their own implementation of Romain there though. His name
is Paul. Lol
On Nov 5, 2013 12:55 AM, "Jean-Louis MONTEIRO" <je...@gmail.com> wrote:

> Lol Romain isn't a committee on HA Jdbc.
> Le 5 nov. 2013 06:08, "Howard W. Smith, Jr." <sm...@gmail.com> a
> écrit :
>
> > FYI/followup,
> >
> > On Sat, Nov 2, 2013 at 9:49 AM, Howard W. Smith, Jr. <
> > smithh032772@gmail.com
> > > wrote:
> >
> > > I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
> > > databases.
> >
> >
> > I had to do the following to ensure tomee would create the ha-jdbc
> > resource:
> >
> > 1. add the following java option
> >
> >
> >
> -Dha-jdbc.configuration=file:/apache-tomee-plus-1.6.0-SNAPSHOT/lib/ha-jdbc-cluster.xml
> >
> >
> > 2. tomee.xml contains the following
> >
> > <!--
> > # create/reference embedded derby driver at startup,
> > # so the driver can be referenced when ha-jdbc resource is created
> > -->
> > <Resource id="jdbc/startup" type="javax.sql.DataSource">
> >   JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
> >   JdbcUrl jdbc:derby:C:/javadb/databases/startup;create=true
> >   UserName ....
> >   Password ....
> >   JtaManaged false
> >   jmxEnabled false
> >   LogSql false
> >   ignoreDefaultValues true
> > </Resource>
> >
> >
> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
> >   JdbcDriver net.sf.hajdbc.sql.Driver
> >   JdbcUrl jdbc:ha-jdbc:cluster
> >   UserName ....
> >   Password ....
> >   JtaManaged true
> >   jmxEnabled false
> >   LogSql false
> >   InitialSize 10
> >   MaxActive 100
> >   MaxIdle 30
> >   MaxWait 10000
> >   minIdle 10
> >   suspectTimeout 60
> >   removeAbandoned true
> >   removeAbandonedTimeout 180
> >   timeBetweenEvictionRunsMillis 30000
> >   jdbcInterceptors=StatementCache(max=128)
> > </Resource>
> >
> >
> > 3. ha-jdbc-cluster.xml (located in tomee/lib)
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <ha-jdbc xmlns="urn:ha-jdbc:cluster:2.1"
> >          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >          xsi:schemaLocation="
> > http://ha-jdbc.github.io/xsd/ha-jdbc-2.1.0-beta-4.xsd">
> >     <sync id="full">
> >        <property name="fetchSize">1000</property>
> >     </sync>
> >     <sync id="diff">
> >        <property name="fetchSize">1000</property>
> >        <property name="versionPattern">version</property>
> >     </sync>
> >     <state id="simple"/>
> >     <cluster dialect="derby" balancer="simple" default-sync="full"
> > meta-data-cache="lazy" transaction-mode="parallel">
> >         <database id="db1" weight="1"
> > location="jdbc:derby:c:/javadb/databases/mcms;create=true">
> >             <user>....</user>
> >             <password>....</password>
> >             <property name="databaseName">mcms</property>
> >             <property
> > name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
> >         </database>
> >         <database id="db2" weight="2"
> > location="jdbc:derby:c:/javadb/databases/mcmsdev;create=true">
> >             <user>....</user>
> >             <password>....</password>
> >             <property name="databaseName">mcms</property>
> >             <property
> > name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
> >         </database>
> >     </cluster>
> > </ha-jdbc>
> >
> >
> > 4. drop ha-jdbc-2.1.0-beta-4.jar (and ha-jdbc-2.1.0-beta-4.xsd) in
> > tomee/lib
> >
> > SQL SELECTs are working as expected, but i'm seeking advice (in the
> ha-jdbc
> > forum) on how to configure ha-jdbc for multiple table-and-row INSERTs. :)
> >
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Lol Romain isn't a committee on HA Jdbc.
Le 5 nov. 2013 06:08, "Howard W. Smith, Jr." <sm...@gmail.com> a
écrit :

> FYI/followup,
>
> On Sat, Nov 2, 2013 at 9:49 AM, Howard W. Smith, Jr. <
> smithh032772@gmail.com
> > wrote:
>
> > I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
> > databases.
>
>
> I had to do the following to ensure tomee would create the ha-jdbc
> resource:
>
> 1. add the following java option
>
>
> -Dha-jdbc.configuration=file:/apache-tomee-plus-1.6.0-SNAPSHOT/lib/ha-jdbc-cluster.xml
>
>
> 2. tomee.xml contains the following
>
> <!--
> # create/reference embedded derby driver at startup,
> # so the driver can be referenced when ha-jdbc resource is created
> -->
> <Resource id="jdbc/startup" type="javax.sql.DataSource">
>   JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
>   JdbcUrl jdbc:derby:C:/javadb/databases/startup;create=true
>   UserName ....
>   Password ....
>   JtaManaged false
>   jmxEnabled false
>   LogSql false
>   ignoreDefaultValues true
> </Resource>
>
>
> <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
>   JdbcDriver net.sf.hajdbc.sql.Driver
>   JdbcUrl jdbc:ha-jdbc:cluster
>   UserName ....
>   Password ....
>   JtaManaged true
>   jmxEnabled false
>   LogSql false
>   InitialSize 10
>   MaxActive 100
>   MaxIdle 30
>   MaxWait 10000
>   minIdle 10
>   suspectTimeout 60
>   removeAbandoned true
>   removeAbandonedTimeout 180
>   timeBetweenEvictionRunsMillis 30000
>   jdbcInterceptors=StatementCache(max=128)
> </Resource>
>
>
> 3. ha-jdbc-cluster.xml (located in tomee/lib)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ha-jdbc xmlns="urn:ha-jdbc:cluster:2.1"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="
> http://ha-jdbc.github.io/xsd/ha-jdbc-2.1.0-beta-4.xsd">
>     <sync id="full">
>        <property name="fetchSize">1000</property>
>     </sync>
>     <sync id="diff">
>        <property name="fetchSize">1000</property>
>        <property name="versionPattern">version</property>
>     </sync>
>     <state id="simple"/>
>     <cluster dialect="derby" balancer="simple" default-sync="full"
> meta-data-cache="lazy" transaction-mode="parallel">
>         <database id="db1" weight="1"
> location="jdbc:derby:c:/javadb/databases/mcms;create=true">
>             <user>....</user>
>             <password>....</password>
>             <property name="databaseName">mcms</property>
>             <property
> name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
>         </database>
>         <database id="db2" weight="2"
> location="jdbc:derby:c:/javadb/databases/mcmsdev;create=true">
>             <user>....</user>
>             <password>....</password>
>             <property name="databaseName">mcms</property>
>             <property
> name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
>         </database>
>     </cluster>
> </ha-jdbc>
>
>
> 4. drop ha-jdbc-2.1.0-beta-4.jar (and ha-jdbc-2.1.0-beta-4.xsd) in
> tomee/lib
>
> SQL SELECTs are working as expected, but i'm seeking advice (in the ha-jdbc
> forum) on how to configure ha-jdbc for multiple table-and-row INSERTs. :)
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
FYI/followup,

On Sat, Nov 2, 2013 at 9:49 AM, Howard W. Smith, Jr. <smithh032772@gmail.com
> wrote:

> I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
> databases.


I had to do the following to ensure tomee would create the ha-jdbc resource:

1. add the following java option

-Dha-jdbc.configuration=file:/apache-tomee-plus-1.6.0-SNAPSHOT/lib/ha-jdbc-cluster.xml


2. tomee.xml contains the following

<!--
# create/reference embedded derby driver at startup,
# so the driver can be referenced when ha-jdbc resource is created
-->
<Resource id="jdbc/startup" type="javax.sql.DataSource">
  JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
  JdbcUrl jdbc:derby:C:/javadb/databases/startup;create=true
  UserName ....
  Password ....
  JtaManaged false
  jmxEnabled false
  LogSql false
  ignoreDefaultValues true
</Resource>


<Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
  JdbcDriver net.sf.hajdbc.sql.Driver
  JdbcUrl jdbc:ha-jdbc:cluster
  UserName ....
  Password ....
  JtaManaged true
  jmxEnabled false
  LogSql false
  InitialSize 10
  MaxActive 100
  MaxIdle 30
  MaxWait 10000
  minIdle 10
  suspectTimeout 60
  removeAbandoned true
  removeAbandonedTimeout 180
  timeBetweenEvictionRunsMillis 30000
  jdbcInterceptors=StatementCache(max=128)
</Resource>


3. ha-jdbc-cluster.xml (located in tomee/lib)

<?xml version="1.0" encoding="UTF-8"?>
<ha-jdbc xmlns="urn:ha-jdbc:cluster:2.1"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="
http://ha-jdbc.github.io/xsd/ha-jdbc-2.1.0-beta-4.xsd">
    <sync id="full">
       <property name="fetchSize">1000</property>
    </sync>
    <sync id="diff">
       <property name="fetchSize">1000</property>
       <property name="versionPattern">version</property>
    </sync>
    <state id="simple"/>
    <cluster dialect="derby" balancer="simple" default-sync="full"
meta-data-cache="lazy" transaction-mode="parallel">
        <database id="db1" weight="1"
location="jdbc:derby:c:/javadb/databases/mcms;create=true">
            <user>....</user>
            <password>....</password>
            <property name="databaseName">mcms</property>
            <property
name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
        </database>
        <database id="db2" weight="2"
location="jdbc:derby:c:/javadb/databases/mcmsdev;create=true">
            <user>....</user>
            <password>....</password>
            <property name="databaseName">mcms</property>
            <property
name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
        </database>
    </cluster>
</ha-jdbc>


4. drop ha-jdbc-2.1.0-beta-4.jar (and ha-jdbc-2.1.0-beta-4.xsd) in tomee/lib

SQL SELECTs are working as expected, but i'm seeking advice (in the ha-jdbc
forum) on how to configure ha-jdbc for multiple table-and-row INSERTs. :)

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
okay, i just found this on tomee examples page,

http://tomee.apache.org/examples-trunk/dynamic-datasource-routing/README.html




On Sun, Nov 3, 2013 at 5:46 AM, Howard W. Smith, Jr. <smithh032772@gmail.com
> wrote:

> I believe that is exactly what I want. I wish I knew about that earlier,
> so I could have tried that earlier, and my preference is to do /use the
> tomee easy way, always, and as much as possible. Thanks Romain. I like the
> dynamic datasources too. Is there a test case (on trunk) available for both
> the fail over and dynamic datasources, separately, so I can evaluate both?
> Please reply with URL of those test cases, if available. Thanks.
>
> If I may ask, was this added to tomee after seeing tomee users mentioning
> or interested in something like this. Definitely a great idea and feature
> to add to the great tomee. :-)
> On Nov 3, 2013 3:15 AM, "Romain Manni-Bucau" <rm...@gmail.com>
> wrote:
>
>> No idea why you have a NPE but do you know
>>
>> http://rmannibucau.wordpress.com/2013/04/26/tomeeopenejb-and-failover-of-datasources/
>> ?
>> Isnt it what you desire more or less?
>> Le 3 nov. 2013 05:11, "Howard W. Smith, Jr." <sm...@gmail.com> a
>> écrit :
>>
>> > trying to get it done via tomee.xml, ha-jdbc-cluster.xml, and java
>> option
>> > -Dha-jdbc... seems to help, but i definitely need help...i been
>> reporting
>> > my progress with this on ha-jdbc forum[1]... i hope to get some help
>> with
>> > this, soon.
>> >
>> > [1]
>> https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/5f4dc302/
>> >
>> >
>> >
>> > On Sat, Nov 2, 2013 at 3:44 PM, Howard W. Smith, Jr. <
>> > smithh032772@gmail.com
>> > > wrote:
>> >
>> > > okay, I'm seeing what you said (not get jta as easily, when using
>> > > context.xml). thanks.
>> > >
>> > >
>> > > On Sat, Nov 2, 2013 at 3:39 PM, Romain Manni-Bucau <
>> > rmannibucau@gmail.com>wrote:
>> > >
>> > >> If you use context.xml youll not get as easily jta.
>> > >>
>> > >> You can set Resource attribute class-name to the impl class and
>> setXxx
>> > >> using xxx as property attribute (factory for instance)
>> > >> Le 2 nov. 2013 18:10, "Howard W. Smith, Jr." <sm...@gmail.com>
>> a
>> > >> écrit :
>> > >>
>> > >> > Per [Avoid properties conflict when configuring TomEE
>> DataSource][1],
>> > I
>> > >> > added ignoreDefaultValues=true to <Resource> in tomee.xml,
>> > >> >
>> > >> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
>> > >> >   JdbcDriver net.sf.hajdbc.sql.DataSource
>> > >> >   IgnoreDefaultValues true
>> > >> >   JtaManaged true
>> > >> >   jmxEnabled true
>> > >> >   LogSql false
>> > >> > </Resource>
>> > >> >
>> > >> > and the result are the [exceptions in the log file][2].
>> > >> >
>> > >> > the exceptions seem to prove that I need to add the following to
>> > >> <Resource
>> > >> > .../>
>> > >> >
>> > >> > cluster="..."
>> > >> > factory="..."
>> > >> >
>> > >> > can you please advise how I can add these two parameters to
>> <Resource
>> > >> .../>
>> > >> > in tomee.xml, or should I revert to META-INF/context.xml?
>> > >> >
>> > >> >
>> > >> > [1]:
>> > >> >
>> > >> >
>> > >>
>> >
>> http://rmannibucau.wordpress.com/2012/11/08/avoid-properties-conflict-when-configuring-tomee-datasource/
>> > >> > [2]: https://gist.github.com/smithh032772/7279765#file-log3-txt
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> > On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
>> > >> > <rm...@gmail.com>wrote:
>> > >> >
>> > >> > > Why workaround? That how it works
>> > >> >
>> > >>
>> > >
>> > >
>> >
>>
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
I believe that is exactly what I want. I wish I knew about that earlier, so
I could have tried that earlier, and my preference is to do /use the tomee
easy way, always, and as much as possible. Thanks Romain. I like the
dynamic datasources too. Is there a test case (on trunk) available for both
the fail over and dynamic datasources, separately, so I can evaluate both?
Please reply with URL of those test cases, if available. Thanks.

If I may ask, was this added to tomee after seeing tomee users mentioning
or interested in something like this. Definitely a great idea and feature
to add to the great tomee. :-)
On Nov 3, 2013 3:15 AM, "Romain Manni-Bucau" <rm...@gmail.com> wrote:

> No idea why you have a NPE but do you know
>
> http://rmannibucau.wordpress.com/2013/04/26/tomeeopenejb-and-failover-of-datasources/
> ?
> Isnt it what you desire more or less?
> Le 3 nov. 2013 05:11, "Howard W. Smith, Jr." <sm...@gmail.com> a
> écrit :
>
> > trying to get it done via tomee.xml, ha-jdbc-cluster.xml, and java option
> > -Dha-jdbc... seems to help, but i definitely need help...i been reporting
> > my progress with this on ha-jdbc forum[1]... i hope to get some help with
> > this, soon.
> >
> > [1] https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/5f4dc302/
> >
> >
> >
> > On Sat, Nov 2, 2013 at 3:44 PM, Howard W. Smith, Jr. <
> > smithh032772@gmail.com
> > > wrote:
> >
> > > okay, I'm seeing what you said (not get jta as easily, when using
> > > context.xml). thanks.
> > >
> > >
> > > On Sat, Nov 2, 2013 at 3:39 PM, Romain Manni-Bucau <
> > rmannibucau@gmail.com>wrote:
> > >
> > >> If you use context.xml youll not get as easily jta.
> > >>
> > >> You can set Resource attribute class-name to the impl class and setXxx
> > >> using xxx as property attribute (factory for instance)
> > >> Le 2 nov. 2013 18:10, "Howard W. Smith, Jr." <sm...@gmail.com>
> a
> > >> écrit :
> > >>
> > >> > Per [Avoid properties conflict when configuring TomEE
> DataSource][1],
> > I
> > >> > added ignoreDefaultValues=true to <Resource> in tomee.xml,
> > >> >
> > >> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
> > >> >   JdbcDriver net.sf.hajdbc.sql.DataSource
> > >> >   IgnoreDefaultValues true
> > >> >   JtaManaged true
> > >> >   jmxEnabled true
> > >> >   LogSql false
> > >> > </Resource>
> > >> >
> > >> > and the result are the [exceptions in the log file][2].
> > >> >
> > >> > the exceptions seem to prove that I need to add the following to
> > >> <Resource
> > >> > .../>
> > >> >
> > >> > cluster="..."
> > >> > factory="..."
> > >> >
> > >> > can you please advise how I can add these two parameters to
> <Resource
> > >> .../>
> > >> > in tomee.xml, or should I revert to META-INF/context.xml?
> > >> >
> > >> >
> > >> > [1]:
> > >> >
> > >> >
> > >>
> >
> http://rmannibucau.wordpress.com/2012/11/08/avoid-properties-conflict-when-configuring-tomee-datasource/
> > >> > [2]: https://gist.github.com/smithh032772/7279765#file-log3-txt
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
> > >> > <rm...@gmail.com>wrote:
> > >> >
> > >> > > Why workaround? That how it works
> > >> >
> > >>
> > >
> > >
> >
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by Romain Manni-Bucau <rm...@gmail.com>.
No idea why you have a NPE but do you know
http://rmannibucau.wordpress.com/2013/04/26/tomeeopenejb-and-failover-of-datasources/?
Isnt it what you desire more or less?
Le 3 nov. 2013 05:11, "Howard W. Smith, Jr." <sm...@gmail.com> a
écrit :

> trying to get it done via tomee.xml, ha-jdbc-cluster.xml, and java option
> -Dha-jdbc... seems to help, but i definitely need help...i been reporting
> my progress with this on ha-jdbc forum[1]... i hope to get some help with
> this, soon.
>
> [1] https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/5f4dc302/
>
>
>
> On Sat, Nov 2, 2013 at 3:44 PM, Howard W. Smith, Jr. <
> smithh032772@gmail.com
> > wrote:
>
> > okay, I'm seeing what you said (not get jta as easily, when using
> > context.xml). thanks.
> >
> >
> > On Sat, Nov 2, 2013 at 3:39 PM, Romain Manni-Bucau <
> rmannibucau@gmail.com>wrote:
> >
> >> If you use context.xml youll not get as easily jta.
> >>
> >> You can set Resource attribute class-name to the impl class and setXxx
> >> using xxx as property attribute (factory for instance)
> >> Le 2 nov. 2013 18:10, "Howard W. Smith, Jr." <sm...@gmail.com> a
> >> écrit :
> >>
> >> > Per [Avoid properties conflict when configuring TomEE DataSource][1],
> I
> >> > added ignoreDefaultValues=true to <Resource> in tomee.xml,
> >> >
> >> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
> >> >   JdbcDriver net.sf.hajdbc.sql.DataSource
> >> >   IgnoreDefaultValues true
> >> >   JtaManaged true
> >> >   jmxEnabled true
> >> >   LogSql false
> >> > </Resource>
> >> >
> >> > and the result are the [exceptions in the log file][2].
> >> >
> >> > the exceptions seem to prove that I need to add the following to
> >> <Resource
> >> > .../>
> >> >
> >> > cluster="..."
> >> > factory="..."
> >> >
> >> > can you please advise how I can add these two parameters to <Resource
> >> .../>
> >> > in tomee.xml, or should I revert to META-INF/context.xml?
> >> >
> >> >
> >> > [1]:
> >> >
> >> >
> >>
> http://rmannibucau.wordpress.com/2012/11/08/avoid-properties-conflict-when-configuring-tomee-datasource/
> >> > [2]: https://gist.github.com/smithh032772/7279765#file-log3-txt
> >> >
> >> >
> >> >
> >> >
> >> > On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
> >> > <rm...@gmail.com>wrote:
> >> >
> >> > > Why workaround? That how it works
> >> >
> >>
> >
> >
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
trying to get it done via tomee.xml, ha-jdbc-cluster.xml, and java option
-Dha-jdbc... seems to help, but i definitely need help...i been reporting
my progress with this on ha-jdbc forum[1]... i hope to get some help with
this, soon.

[1] https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/5f4dc302/



On Sat, Nov 2, 2013 at 3:44 PM, Howard W. Smith, Jr. <smithh032772@gmail.com
> wrote:

> okay, I'm seeing what you said (not get jta as easily, when using
> context.xml). thanks.
>
>
> On Sat, Nov 2, 2013 at 3:39 PM, Romain Manni-Bucau <rm...@gmail.com>wrote:
>
>> If you use context.xml youll not get as easily jta.
>>
>> You can set Resource attribute class-name to the impl class and setXxx
>> using xxx as property attribute (factory for instance)
>> Le 2 nov. 2013 18:10, "Howard W. Smith, Jr." <sm...@gmail.com> a
>> écrit :
>>
>> > Per [Avoid properties conflict when configuring TomEE DataSource][1], I
>> > added ignoreDefaultValues=true to <Resource> in tomee.xml,
>> >
>> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
>> >   JdbcDriver net.sf.hajdbc.sql.DataSource
>> >   IgnoreDefaultValues true
>> >   JtaManaged true
>> >   jmxEnabled true
>> >   LogSql false
>> > </Resource>
>> >
>> > and the result are the [exceptions in the log file][2].
>> >
>> > the exceptions seem to prove that I need to add the following to
>> <Resource
>> > .../>
>> >
>> > cluster="..."
>> > factory="..."
>> >
>> > can you please advise how I can add these two parameters to <Resource
>> .../>
>> > in tomee.xml, or should I revert to META-INF/context.xml?
>> >
>> >
>> > [1]:
>> >
>> >
>> http://rmannibucau.wordpress.com/2012/11/08/avoid-properties-conflict-when-configuring-tomee-datasource/
>> > [2]: https://gist.github.com/smithh032772/7279765#file-log3-txt
>> >
>> >
>> >
>> >
>> > On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
>> > <rm...@gmail.com>wrote:
>> >
>> > > Why workaround? That how it works
>> >
>>
>
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
okay, I'm seeing what you said (not get jta as easily, when using
context.xml). thanks.


On Sat, Nov 2, 2013 at 3:39 PM, Romain Manni-Bucau <rm...@gmail.com>wrote:

> If you use context.xml youll not get as easily jta.
>
> You can set Resource attribute class-name to the impl class and setXxx
> using xxx as property attribute (factory for instance)
> Le 2 nov. 2013 18:10, "Howard W. Smith, Jr." <sm...@gmail.com> a
> écrit :
>
> > Per [Avoid properties conflict when configuring TomEE DataSource][1], I
> > added ignoreDefaultValues=true to <Resource> in tomee.xml,
> >
> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
> >   JdbcDriver net.sf.hajdbc.sql.DataSource
> >   IgnoreDefaultValues true
> >   JtaManaged true
> >   jmxEnabled true
> >   LogSql false
> > </Resource>
> >
> > and the result are the [exceptions in the log file][2].
> >
> > the exceptions seem to prove that I need to add the following to
> <Resource
> > .../>
> >
> > cluster="..."
> > factory="..."
> >
> > can you please advise how I can add these two parameters to <Resource
> .../>
> > in tomee.xml, or should I revert to META-INF/context.xml?
> >
> >
> > [1]:
> >
> >
> http://rmannibucau.wordpress.com/2012/11/08/avoid-properties-conflict-when-configuring-tomee-datasource/
> > [2]: https://gist.github.com/smithh032772/7279765#file-log3-txt
> >
> >
> >
> >
> > On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> > > Why workaround? That how it works
> >
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by Romain Manni-Bucau <rm...@gmail.com>.
If you use context.xml youll not get as easily jta.

You can set Resource attribute class-name to the impl class and setXxx
using xxx as property attribute (factory for instance)
Le 2 nov. 2013 18:10, "Howard W. Smith, Jr." <sm...@gmail.com> a
écrit :

> Per [Avoid properties conflict when configuring TomEE DataSource][1], I
> added ignoreDefaultValues=true to <Resource> in tomee.xml,
>
> <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
>   JdbcDriver net.sf.hajdbc.sql.DataSource
>   IgnoreDefaultValues true
>   JtaManaged true
>   jmxEnabled true
>   LogSql false
> </Resource>
>
> and the result are the [exceptions in the log file][2].
>
> the exceptions seem to prove that I need to add the following to <Resource
> .../>
>
> cluster="..."
> factory="..."
>
> can you please advise how I can add these two parameters to <Resource .../>
> in tomee.xml, or should I revert to META-INF/context.xml?
>
>
> [1]:
>
> http://rmannibucau.wordpress.com/2012/11/08/avoid-properties-conflict-when-configuring-tomee-datasource/
> [2]: https://gist.github.com/smithh032772/7279765#file-log3-txt
>
>
>
>
> On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > Why workaround? That how it works
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
Per [Avoid properties conflict when configuring TomEE DataSource][1], I
added ignoreDefaultValues=true to <Resource> in tomee.xml,

<Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
  JdbcDriver net.sf.hajdbc.sql.DataSource
  IgnoreDefaultValues true
  JtaManaged true
  jmxEnabled true
  LogSql false
</Resource>

and the result are the [exceptions in the log file][2].

the exceptions seem to prove that I need to add the following to <Resource
.../>

cluster="..."
factory="..."

can you please advise how I can add these two parameters to <Resource .../>
in tomee.xml, or should I revert to META-INF/context.xml?


[1]:
http://rmannibucau.wordpress.com/2012/11/08/avoid-properties-conflict-when-configuring-tomee-datasource/
[2]: https://gist.github.com/smithh032772/7279765#file-log3-txt




On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> Why workaround? That how it works

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
now, i know, thanks! :)




On Sat, Nov 2, 2013 at 11:09 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> Why workaround? That how it works
> Le 2 nov. 2013 15:48, "Howard W. Smith, Jr." <sm...@gmail.com> a
> écrit :
>
> > The following is the workaround:
> >
> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
> >   JdbcDriver net.sf.hajdbc.sql.DataSource
> >   UserName ....
> >   Password ....
> >   JtaManaged true
> >   jmxEnabled true
> >   LogSql false
> > </Resource>
> >
> > and had to rename filename from ha-jdbc-cluster.xml to ha-jdbc-null.xml.
> >
> > still getting errors, but they are related to ha-jdbc, now.
> >
> >
> > On Sat, Nov 2, 2013 at 9:49 AM, Howard W. Smith, Jr. <
> > smithh032772@gmail.com
> > > wrote:
> >
> > > I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
> > > databases. As per documentation and forum discussion, I have the
> > following:
> > >
> > > --- tomee.xml ---
> > >
> > > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
> > >   factory="net.sf.hajdbc.sql.DataSourceFactory"
> > >   cluster="cluster"
> > >   UserName ....
> > >   Password ...
> > >   JtaManaged true
> > >   jmxEnabled true
> > >   LogSql false
> > > </Resource>
> > >
> > > --- ha-jdbc-cluster.xml ---
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <ha-jdbc xmlns="urn:ha-jdbc:cluster:2.1">
> > >     <sync id="full">
> > >        <property name="fetchSize">1000</property>
> > >     </sync>
> > >     <sync id="diff">
> > >        <property name="fetchSize">1000</property>
> > >        <property name="versionPattern">version</property>
> > >     </sync>
> > >     <state id="simple"/>
> > >     <cluster dialect="derby" balancer="simple" default-sync="full"
> > > meta-data-cache="lazy" transaction-mode="parallel">
> > >         <database id="db1" weight="1"
> > > location="org.apache.tomcat.jdbc.pool.DataSource">
> > >             <user>...</user>
> > >             <password>...</password>
> > >             <property name="serverName">mcms</property>
> > >             <property name="databaseName">mcms</property>
> > >             <property
> > > name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
> > >             <property
> > > name="url">jdbc:derby:c:/javadb/databases/mcms;create=true</property>
> > >             <property name="InitialSize">10</property>
> > >             <property name="MaxActive">100</property>
> > >             <property name="MaxIdle">30</property>
> > >             <property name="MaxWait">10000</property>
> > >             <property name="minIdle">10</property>
> > >             <property name="suspectTimeout">60</property>
> > >             <property name="removeAbandoned">true</property>
> > >             <property name="removeAbandonedTimeout">180</property>
> > >             <property
> > name="timeBetweenEvictionRunsMillis">30000</property>
> > >             <property
> > > name="jdbcInterceptors">StatementCache(max=128)</property>
> > >         </database>
> > >         <database id="db2" weight="2"
> > > location="org.apache.tomcat.jdbc.pool.DataSource">
> > >             <user>...</user>
> > >             <password>...</password>
> > >             <property name="serverName">mcms</property>
> > >             <property name="databaseName">mcms</property>
> > >             <property
> > > name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
> > >             <property
> > >
> name="url">jdbc:derby:c:/javadb/databases/mcmsdev;create=true</property>
> > >             <property name="InitialSize">10</property>
> > >             <property name="MaxActive">100</property>
> > >             <property name="MaxIdle">30</property>
> > >             <property name="MaxWait">10000</property>
> > >             <property name="minIdle">10</property>
> > >             <property name="suspectTimeout">60</property>
> > >             <property name="removeAbandoned">true</property>
> > >             <property name="removeAbandonedTimeout">180</property>
> > >             <property
> > name="timeBetweenEvictionRunsMillis">30000</property>
> > >             <property
> > > name="jdbcInterceptors">StatementCache(max=128)</property>
> > >         </database>
> > >     </cluster>
> > > </ha-jdbc>
> > >
> > >
> > > which results in the following in the log:
> > >
> > >
> > > INFO: Creating Resource(id=jdbc/mcmsJta)
> > >
> > > Nov 02, 2013 9:15:03 AM
> > > org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource readOnly
> > > INFO: Disabling testOnBorrow since no validation query is provided
> > >
> > > Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> > > logUnusedProperties
> > > WARNING: Property "factory" not supported by "jdbc/mcmsJta"
> > >
> > > Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> > > logUnusedProperties
> > > WARNING: Property "cluster" not supported by "jdbc/mcmsJta"
> > >
> > > Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> > > createRecipe
> > >
> > >
> > > now, my app is not connecting to my database, and it is trying to use
> > > default database connection (hsqldb, which is probably the non-jta
> > database
> > > which is configured automatically by tomee, if/when 'no' non-jta
> database
> > > is configured/specified in tomee.xml via <Resource ... />.
> > >
> > > Should I move the <Resource .../> from tomee.xml to (webapp)
> > > META-INF/context.xml as recommended here[2]?
> > >
> > >
> > > [1] http://ha-jdbc.github.io/
> > > [2]
> https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/4707f208/
> > >
> > >
> >
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Why workaround? That how it works
Le 2 nov. 2013 15:48, "Howard W. Smith, Jr." <sm...@gmail.com> a
écrit :

> The following is the workaround:
>
> <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
>   JdbcDriver net.sf.hajdbc.sql.DataSource
>   UserName ....
>   Password ....
>   JtaManaged true
>   jmxEnabled true
>   LogSql false
> </Resource>
>
> and had to rename filename from ha-jdbc-cluster.xml to ha-jdbc-null.xml.
>
> still getting errors, but they are related to ha-jdbc, now.
>
>
> On Sat, Nov 2, 2013 at 9:49 AM, Howard W. Smith, Jr. <
> smithh032772@gmail.com
> > wrote:
>
> > I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
> > databases. As per documentation and forum discussion, I have the
> following:
> >
> > --- tomee.xml ---
> >
> > <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
> >   factory="net.sf.hajdbc.sql.DataSourceFactory"
> >   cluster="cluster"
> >   UserName ....
> >   Password ...
> >   JtaManaged true
> >   jmxEnabled true
> >   LogSql false
> > </Resource>
> >
> > --- ha-jdbc-cluster.xml ---
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <ha-jdbc xmlns="urn:ha-jdbc:cluster:2.1">
> >     <sync id="full">
> >        <property name="fetchSize">1000</property>
> >     </sync>
> >     <sync id="diff">
> >        <property name="fetchSize">1000</property>
> >        <property name="versionPattern">version</property>
> >     </sync>
> >     <state id="simple"/>
> >     <cluster dialect="derby" balancer="simple" default-sync="full"
> > meta-data-cache="lazy" transaction-mode="parallel">
> >         <database id="db1" weight="1"
> > location="org.apache.tomcat.jdbc.pool.DataSource">
> >             <user>...</user>
> >             <password>...</password>
> >             <property name="serverName">mcms</property>
> >             <property name="databaseName">mcms</property>
> >             <property
> > name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
> >             <property
> > name="url">jdbc:derby:c:/javadb/databases/mcms;create=true</property>
> >             <property name="InitialSize">10</property>
> >             <property name="MaxActive">100</property>
> >             <property name="MaxIdle">30</property>
> >             <property name="MaxWait">10000</property>
> >             <property name="minIdle">10</property>
> >             <property name="suspectTimeout">60</property>
> >             <property name="removeAbandoned">true</property>
> >             <property name="removeAbandonedTimeout">180</property>
> >             <property
> name="timeBetweenEvictionRunsMillis">30000</property>
> >             <property
> > name="jdbcInterceptors">StatementCache(max=128)</property>
> >         </database>
> >         <database id="db2" weight="2"
> > location="org.apache.tomcat.jdbc.pool.DataSource">
> >             <user>...</user>
> >             <password>...</password>
> >             <property name="serverName">mcms</property>
> >             <property name="databaseName">mcms</property>
> >             <property
> > name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
> >             <property
> > name="url">jdbc:derby:c:/javadb/databases/mcmsdev;create=true</property>
> >             <property name="InitialSize">10</property>
> >             <property name="MaxActive">100</property>
> >             <property name="MaxIdle">30</property>
> >             <property name="MaxWait">10000</property>
> >             <property name="minIdle">10</property>
> >             <property name="suspectTimeout">60</property>
> >             <property name="removeAbandoned">true</property>
> >             <property name="removeAbandonedTimeout">180</property>
> >             <property
> name="timeBetweenEvictionRunsMillis">30000</property>
> >             <property
> > name="jdbcInterceptors">StatementCache(max=128)</property>
> >         </database>
> >     </cluster>
> > </ha-jdbc>
> >
> >
> > which results in the following in the log:
> >
> >
> > INFO: Creating Resource(id=jdbc/mcmsJta)
> >
> > Nov 02, 2013 9:15:03 AM
> > org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource readOnly
> > INFO: Disabling testOnBorrow since no validation query is provided
> >
> > Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> > logUnusedProperties
> > WARNING: Property "factory" not supported by "jdbc/mcmsJta"
> >
> > Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> > logUnusedProperties
> > WARNING: Property "cluster" not supported by "jdbc/mcmsJta"
> >
> > Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> > createRecipe
> >
> >
> > now, my app is not connecting to my database, and it is trying to use
> > default database connection (hsqldb, which is probably the non-jta
> database
> > which is configured automatically by tomee, if/when 'no' non-jta database
> > is configured/specified in tomee.xml via <Resource ... />.
> >
> > Should I move the <Resource .../> from tomee.xml to (webapp)
> > META-INF/context.xml as recommended here[2]?
> >
> >
> > [1] http://ha-jdbc.github.io/
> > [2] https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/4707f208/
> >
> >
>

Re: HA-JDBC via tomee.xml properties ignored

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
The following is the workaround:

<Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
  JdbcDriver net.sf.hajdbc.sql.DataSource
  UserName ....
  Password ....
  JtaManaged true
  jmxEnabled true
  LogSql false
</Resource>

and had to rename filename from ha-jdbc-cluster.xml to ha-jdbc-null.xml.

still getting errors, but they are related to ha-jdbc, now.


On Sat, Nov 2, 2013 at 9:49 AM, Howard W. Smith, Jr. <smithh032772@gmail.com
> wrote:

> I'm trying to use HA-JDBC[1] with TomEE to have a cluster of at least 2
> databases. As per documentation and forum discussion, I have the following:
>
> --- tomee.xml ---
>
> <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
>   factory="net.sf.hajdbc.sql.DataSourceFactory"
>   cluster="cluster"
>   UserName ....
>   Password ...
>   JtaManaged true
>   jmxEnabled true
>   LogSql false
> </Resource>
>
> --- ha-jdbc-cluster.xml ---
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ha-jdbc xmlns="urn:ha-jdbc:cluster:2.1">
>     <sync id="full">
>        <property name="fetchSize">1000</property>
>     </sync>
>     <sync id="diff">
>        <property name="fetchSize">1000</property>
>        <property name="versionPattern">version</property>
>     </sync>
>     <state id="simple"/>
>     <cluster dialect="derby" balancer="simple" default-sync="full"
> meta-data-cache="lazy" transaction-mode="parallel">
>         <database id="db1" weight="1"
> location="org.apache.tomcat.jdbc.pool.DataSource">
>             <user>...</user>
>             <password>...</password>
>             <property name="serverName">mcms</property>
>             <property name="databaseName">mcms</property>
>             <property
> name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
>             <property
> name="url">jdbc:derby:c:/javadb/databases/mcms;create=true</property>
>             <property name="InitialSize">10</property>
>             <property name="MaxActive">100</property>
>             <property name="MaxIdle">30</property>
>             <property name="MaxWait">10000</property>
>             <property name="minIdle">10</property>
>             <property name="suspectTimeout">60</property>
>             <property name="removeAbandoned">true</property>
>             <property name="removeAbandonedTimeout">180</property>
>             <property name="timeBetweenEvictionRunsMillis">30000</property>
>             <property
> name="jdbcInterceptors">StatementCache(max=128)</property>
>         </database>
>         <database id="db2" weight="2"
> location="org.apache.tomcat.jdbc.pool.DataSource">
>             <user>...</user>
>             <password>...</password>
>             <property name="serverName">mcms</property>
>             <property name="databaseName">mcms</property>
>             <property
> name="driver">org.apache.derby.jdbc.EmbeddedDriver</property>
>             <property
> name="url">jdbc:derby:c:/javadb/databases/mcmsdev;create=true</property>
>             <property name="InitialSize">10</property>
>             <property name="MaxActive">100</property>
>             <property name="MaxIdle">30</property>
>             <property name="MaxWait">10000</property>
>             <property name="minIdle">10</property>
>             <property name="suspectTimeout">60</property>
>             <property name="removeAbandoned">true</property>
>             <property name="removeAbandonedTimeout">180</property>
>             <property name="timeBetweenEvictionRunsMillis">30000</property>
>             <property
> name="jdbcInterceptors">StatementCache(max=128)</property>
>         </database>
>     </cluster>
> </ha-jdbc>
>
>
> which results in the following in the log:
>
>
> INFO: Creating Resource(id=jdbc/mcmsJta)
>
> Nov 02, 2013 9:15:03 AM
> org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource readOnly
> INFO: Disabling testOnBorrow since no validation query is provided
>
> Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> logUnusedProperties
> WARNING: Property "factory" not supported by "jdbc/mcmsJta"
>
> Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> logUnusedProperties
> WARNING: Property "cluster" not supported by "jdbc/mcmsJta"
>
> Nov 02, 2013 9:15:03 AM org.apache.openejb.assembler.classic.Assembler
> createRecipe
>
>
> now, my app is not connecting to my database, and it is trying to use
> default database connection (hsqldb, which is probably the non-jta database
> which is configured automatically by tomee, if/when 'no' non-jta database
> is configured/specified in tomee.xml via <Resource ... />.
>
> Should I move the <Resource .../> from tomee.xml to (webapp)
> META-INF/context.xml as recommended here[2]?
>
>
> [1] http://ha-jdbc.github.io/
> [2] https://sourceforge.net/p/ha-jdbc/discussion/383396/thread/4707f208/
>
>