I'll try the snapshot and the resource.xml. Here's an update, I managed to
get it working with the following configuration
server.xml
<GlobalNamingResources>
<Resource name="jdbc/datasource" auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
maxActive="100" maxIdle="30" maxWait="10000" username="user"
password="secret"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL =
TCP) (HOST =
localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME =
SERVICE)))" />
</GlobalNamingResources>
context.xml
<ResourceLink name="jdbc/datasource" global="jdbc/datasource"
type="javax.sql.DataSource"/>
logback.xml
<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
<connectionSource class="ch.qos.logback.core.db.JNDIConnectionSource">
<jndiLocation>java:jdbc/datasource</jndiLocation>
</connectionSource>
</appender>
In this case, it is successful. But it doesn't feel correct to look it up
by the global name here. From what I can tell TomEE loads global resources
then initializes the logger and then finally registers resources under
comp/env/ ?
Thanks for the help.
--
View this message in context:
http://openejb.979440.n4.nabble.com/TomEE-with-logback-DBAppender-failing-jndi-lookup-tp4662655p4662660.html
Sent from the OpenEJB User mailing list archive at Nabble.com.