35 lines
912 B
Java
35 lines
912 B
Java
package org.acme.service;
|
|
|
|
import static org.acme.service.Utils.*;
|
|
|
|
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
|
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
|
|
|
public class StatefulContext extends GCUBEStatefulPortTypeContext {
|
|
|
|
|
|
/** Single context instance, created eagerly */
|
|
private static GCUBEStatefulPortTypeContext cache = new StatefulContext();
|
|
|
|
/**Create an instance, privately */
|
|
private StatefulContext(){}
|
|
|
|
/** Returns singleton context.
|
|
* @return the context. */
|
|
public static GCUBEStatefulPortTypeContext getContext() {return cache;}
|
|
|
|
/** {@inheritDoc} **/
|
|
public String getJNDIName() {return STATEFUL_NAME;}
|
|
|
|
/** {@inheritDoc} **/
|
|
public String getNamespace() {return NS;}
|
|
|
|
/** {@inheritDoc} **/
|
|
public GCUBEServiceContext getServiceContext() {return ServiceContext.getContext();}
|
|
|
|
|
|
|
|
|
|
|
|
}
|