Is resources.xml specific to TomEE? If so, shouldn't it be called tomee-resources.xml to prevent possible future collisions in naming?
And presumably it will be picked up in META-INF in standard jar archives? On 12 March 2013 06:23, Romain Manni-Bucau <[email protected]> wrote: > Hi, > > it should be in WEB-INF. The fact it was being picked in META-INF was > a bug/side effect. > > BTW i added it as a feature since it was working before: > https://issues.apache.org/jira/browse/TOMEE-790 > > 2013/3/12, zeeman <[email protected]>: > > I was on Tomee 1.5.1 and upgraded to latest snapshot by removing 1.5.1 > lib > > folder, then copying 1.6 snapshot lib. > > > > My DS was getting picked up fine from > > /sportivity/src/main/resources/META-INF/resources.xml in 1.5 > > > > Here is how I have it defined. > > > > <Resource id="sportivityDS" type="javax.sql.DataSource"> > > DataSourceCreator tomcat > > JdbcDriver org.postgresql.Driver > > JdbcUrl jdbc:postgresql://127.0.0.1:5432/sportivity > > UserName u > > Password psw > > JtaManaged true > > MaxActive 100 > > InitialSize 2 > > MaxIdle 25 > > MinIdle 2 > > suspectTimeout 60 > > maxWait 10000 > > TimeBetweenEvictionRunsMillis 60000 > > minEvictableIdleTimeMillis 60000 > > testOnBorrow true > > validationInterval 30000 > > removeAbandoned true > > removeAbandonedTimeout 60 > > logAbandoned true > > ValidationQuery SELECT 1 > > jmxEnabled false > > > > > jdbcInterceptors=ConnectionState;StatementFinalizer;StatementCache(prepared=true,callable=false,max=200);SlowQueryReportJmx(threshold=2000,maxQueries=1000,notifyPool=false); > > </Resource> > > > > My persistence.xml uses above resources: > > > > <persistence-unit name="sportivity-PU" transaction-type="JTA"> > > <provider>org.hibernate.ejb.HibernatePersistence</provider> > > <jta-data-source>sportivityDS</jta-data-source> > > > <exclude-unlisted-classes>false</exclude-unlisted-classes> > > > > > > </persistence-unit> > > </persistence> > > > > What got changed? The DS that got picked by tomee was the default Hsql > one > > not PG one. > > > > > > > > -- > > View this message in context: > > > http://openejb.979440.n4.nabble.com/1-6-snapshot-Tomee-does-not-use-resources-xml-tp4661416.html > > Sent from the OpenEJB User mailing list archive at Nabble.com. > > > > > -- > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* >
