openejb:Resource/qjobdb or java:openejb/Resource/qjobdb is the actual jndi
name is you dont rely on java:global/qjobdb


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2016-01-22 23:23 GMT+01:00 daveg-iwd <[email protected]>:

> On TomEE 7.0.0-M1
>
> I've been trying to configure my application that will use some @Schedule'd
> beans to run in a cluster.  I'd also like to reference the database that
> quartz will want via JNDI.  I have this in my "module.properties" file
> which
> I've included in the WEB-INF folder of my project:
>
> org.quartz.scheduler.userTransactionURL=java:comp/TransactionManager
> org.quartz.jobStore.class =
> org.apache.openejb.quartz.impl.jdbcjobstore.JobStoreCMT
>
> org.quartz.jobStore.driverDelegateClass=org.apache.openejb.quartz.impl.jdbcjobstore.StdJDBCDelegate
> org.quartz.jobStore.useProperties = false
> org.quartz.jobStore.isClustered = true
> org.quartz.jobStore.clusterCheckinInterval = 5000
> org.quartz.jobStore.txIsolationLevelSerializable = true
> org.quartz.jobStore.txIsolationLevelReadCommitted = true
> org.quartz.jobStore.dataSource = JtaMySqlDS
> org.quartz.dataSource.JtaMySqlDS.jndiURL = java:comp/env/jdbc/qjobdb
> org.quartz.jobStore.nonManagedTXDataSource = MySqlDS
> org.quartz.dataSource.MySqlDS.jndiURL = java:comp/env/jdbc/qjobdbNonJta
>
> Whenever Tomee starts up, I get lookup jndi lookup exceptions and the
> application will not deploy.  The first exception looks like this:
>
> SEVERE: Error looking up datasource: Name [comp/env/jdbc/qjobdbNonJta] is
> not bound in this Context. Unable to find [comp].
> javax.naming.NameNotFoundException: Name [comp/env/jdbc/qjobdbNonJta] is
> not
> bound in this Context. Unable to find [comp].
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:818)
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:166)
>         at
> org.apache.naming.SelectorContext.lookup(SelectorContext.java:157)
>         at javax.naming.InitialContext.lookup(InitialContext.java:417)
>         at
>
> org.apache.openejb.quartz.utils.JNDIConnectionProvider.init(JNDIConnectionProvider.java:124)
>         at
>
> org.apache.openejb.quartz.utils.JNDIConnectionProvider.<init>(JNDIConnectionProvider.java:102)
>         at
>
> org.apache.openejb.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:993)
>         at
>
> org.apache.openejb.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1519)
>               blah blah blah
>
> Of course I've defined the datasources in tomee.xml (as jdbc/qjobdb and
> jdbc/qjobdbNonJta) and I can see them get configured during startup.  I've
> tried all manner of jndi name formats (like just java:comp/jdbc/qjobdb ).
> I've also tried adding a resource-ref to the web.xml.
>
> Is there something I'm missing in the naming syntax or elsewhere?
>
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Quartz-config-jndi-lookup-problem-tp4677510.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to