Forum Stats

  • 3,853,995 Users
  • 2,264,304 Discussions


EJB 3.1 Timer @Singleton does not start on Oracle Cloud - works locally

Michael OBrien
Michael OBrien Member Posts: 26 Blue Ribbon
edited Jun 4, 2013 11:14AM in Java Cloud Service
I am evaluating Oracle Cloud for commercial deployment and am running into issues whenever I include EJB (in ejb.jar or in the war for WebProfile components). The test WAR's and EAR's I run on a local WebLogic deploy and work fine but either do not deploy (no detailed logs) or do not work on the WLS server on the Oracle Cloud Exalogic server.

For example, a simple timer service bean works fine locally - it automatically starts on deployment and periodically runs and persists to the DB fine.

public class CaptureTimerService {// implements CaptureTimerServiceLocal {
@Schedule(minute="*/1", hour="*")
public void process() {
System.out.println("Scheduled " + System.currentTimeMillis());
... logic
System.out.println("S: " + start + " N: " + current + " M: " + maxValue + " P: " + maxPath + " ms:" + (msEnd - msStart));
persist(String.valueOf(runs), (int)(msEnd - msStart));

Scheduled 1370357280877
S: 27 N: 8388635 M: 60342610919632 P: 664 ms:40234
[EL Info]: 2013-06-04 10:48:41.13--ServerSession(10058588)--EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130403-740364a
[EL Info]: connection: 2013-06-04 10:48:41.132--ServerSession(10058588)--file:/D:/Dropbox/oracle_cloud/com.obrienlabs.opendatalink.ODL3Web/build/classes/_JPAServletPU login successful
Committing:[ id=3251name=2allComments=nulldateVisited=null ]
[EL Info]: connection: 2013-06-04 10:48:41.14--ServerSession(10058588)--file:/D:/Dropbox/oracle_cloud/com.obrienlabs.opendatalink.ODL3Web/build/classes/_JPAServletPU logout successful
Scheduled 1370357340155
S: 27 N: 8388635 M: 60342610919632 P: 664 ms:36843
[EL Info]: 2013-06-04 10:49:37.016--ServerSession(31377664)--EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130403-740364a
[EL Info]: connection: 2013-06-04 10:49:37.018--ServerSession(31377664)--file:/D:/Dropbox/oracle_cloud/com.obrienlabs.opendatalink.ODL3Web/build/classes/_JPAServletPU login successful
Committing:[ id=3301name=3allComments=nulldateVisited=null ]
[EL Info]: connection: 2013-06-04 10:49:37.025--ServerSession(31377664)--file:/D:/Dropbox/oracle_cloud/com.obrienlabs.opendatalink.ODL3Web/build/classes/_JPAServletPU logout successful
Note: I upgraded EclipseLink from 2.3 to 2.5 - this is unrelated

But on the cloud I get a clean whitelist, virus and deployment log - but the singleton timer bean does not start.
I also cannot check the logs on the managed server to see if the annotation was picked up during deployment.
logs like
[EL Finest]: weaver: 2013-06-04 10:47:05.285--ServerSession(2949471)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Weaved REST [com.obrienlabs.opendatalink.model.AbstractMappedSuperclass].

Could we get a list if possible of what is working for EJB 3.1, JAX-RS, non-weaved @PersistenceUnit and @PersistenceContext injection.
I understand no @Remote EJB's are supported
I see from the page below that EJB 3.1 is omitted - am I right in assuming that only EJB 3.0 is supported - and therefore only programmatic timer beans.

Automatically-created EJB Timers

thank you
This discussion has been closed.