Can’t get Glassfish 3.1.2.2 to use anything other than jdbc/__TimerService for the EJB Timer Service

glassfishjdbc

I am trying to set up a Glassfish cluster (1 DAS with a cluster that has an instance running on an ssh-node).

This is where I am:

  • DAS running
  • Cluster created

    asadmin create-cluster cluster
    
  • Node created

    asadmin create-node-ssh --nodehost apphost --installdir /opt/glassfish3 node-apphost
    
  • Instance installed and configured

    asadmin create-instance --node node-apphost --cluster cluster cluster-instance-apphost
    

When I try to start the remote instance, I get these exceptions in server.log

[#|2013-02-05T12:42:28.603-0500|WARNING|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=10;_ThreadName=Thread-2;|Cannot deploy or load EJBTimerService: 
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: jdbc]
        at org.glassfish.

The instance does start but my application deployment fails with

Exception while loading the app : EJB Timer Service is not available

I tried to set the configs.config.cluster-config.ejb-container.ejb-timer-service.timer-datasource configuration property to "jdbc/__ default" ( after wiping the node, even re-created the cluster ) as a test, per the GF docs – although at this point i'm quite sure that wont yield an actual connection to any remotely accessible database as i don't have one set up – the point is, no matter what i do i still see the remote instance trying to look up "jdbc/__ TimerService" ..

How do I get my remote instance to use the timer-datasource defined in its cluster configuration?

Best Answer

In the Oracle GlassFish Server 3.1 Application Development Guide

http://docs.oracle.com/cd/E18930_01/html/821-2418/beahw.html

you can see this line:

Caution - Do not use the jdbc/__TimerPool resource for timers in clustered GlassFish Server environments. You must instead use a custom JDBC resource or the jdbc/__default resource. See the instructions below, in To Deploy an EJB Timer to a Cluster. Also refer to Enabling the jdbc/__default Resource in a Clustered Environment in Oracle GlassFish Server 3.1 Administration Guide.

Related Topic