2016-11-23 10:13 GMT+01:00 Emmanuel Touzery <[email protected]> :
> Hello, > > I see we can define an inline server.xml & tomee.xml, what about >>> >> beans.xml, web.xml, context.xml, resources.xml..., how should we handle >> this? >> Beans.xml is almost useless with cdi 1.1 with @Priority, web.xml too with >> ServletContextInitializer and resources.xml can be fully replaced by >> container properties in the plugin config. >> >> If you really want it there are few options like using a jsCustomizer to >> synchronize 2 folders and change the docBase or just use standard maven >> output folder and use another synchro way. >> > > thank you, that helps! Focusing on the resources.xml for now. This takes > me further => > > <containerProperties> > <jdbc_generic>new://Resource?type=javax.sql.DataSource</jdbc_generic> > <jdbc_generic.jdbcDriver>org.postgresql.Driver</jdbc_generic.jdbcDriver> > <jdbc_generic.jdbcUrl>jdbc:postgresql://localhost/generic</ > jdbc_generic.jdbcUrl> > <jdbc_generic.userName>postgres</jdbc_generic.userName> > <jdbc_generic.password>postgres</jdbc_generic.password> > <jdbc_generic.maxActive>20</jdbc_generic.maxActive> > <jdbc_generic.maxIdle>20</jdbc_generic.maxIdle> > <jdbc_generic.validationQuery>select version();</jdbc_generic.valid > ationQuery> > <jdbc_generic.testWhileIdle>true</jdbc_generic.testWhileIdle> > <jdbc_generic.testOnBorrow>true</jdbc_generic.testOnBorrow> > <jdbc_generic.testOnReturn>false</jdbc_generic.testOnReturn> > <jdbc_generic.timeBetweenEvictionRuns>10000 millisecond</jdbc_generic.time > BetweenEvictionRuns> > <jdbc_generic.removeAbandonedTimeout>4400</jdbc_generic.remo > veAbandonedTimeout> > <jdbc_generic.removeAbandoned>true</jdbc_generic.removeAbandoned> > <jdbc_generic.maxWaitTime>30000 millisecond</jdbc_generic.maxWaitTime> > </containerProperties> > > My next issue is that the postgresql driver is not found. With > tomee-maven-plugin, I could do => > > <libs> > <lib>org.postgresql:postgresql:9.4-1201-jdbc41</lib> > </libs> > > Not sure how to handle that with tomee-embedded-maven-plugin? > > That is the funny part: the "container" is the maven plugin classloader so just add it as a plugin dependency (fully maven standard) > Thank you! > > Emmanuel >
