Refine search
@Singleton @Startup @ConcurrencyManagement(ConcurrencyManagementType.BEAN) @TransactionAttribute(TransactionAttributeType.REQUIRED) @ProcessApplication
public LockFactory(AspectBeanFactory<X> beanFactory, AspectFactory<X> next) { super(beanFactory, next); AnnotatedType<X> beanType = beanFactory.getBeanType(); ConcurrencyManagement concurrencyManagement = beanType .getAnnotation(ConcurrencyManagement.class); if (concurrencyManagement != null) { _concurrencyManagement = concurrencyManagement.value(); } Lock lock = beanType.getAnnotation(Lock.class); if (lock != null) { _classLockType = lock.value(); } _classAccessTimeout = beanType.getAnnotation(AccessTimeout.class); }
@Override protected void fillClassDefaults() { AnnotatedTypeImpl<X> ejbClass = getAnnotatedType(); ConcurrencyManagement concurrencyManagementAttribute = ejbClass .getAnnotation(ConcurrencyManagement.class); if ((concurrencyManagementAttribute == null) || (concurrencyManagementAttribute.value() == ConcurrencyManagementType.CONTAINER)) { Lock lockingAttribute = ejbClass.getAnnotation(Lock.class); if (lockingAttribute == null) { ejbClass.addAnnotation(new LockingAttributeLiteral(LockType.WRITE)); } } super.fillClassDefaults(); } }
/** * @author Tassilo Weidner */ @Singleton @Startup @ConcurrencyManagement(ConcurrencyManagementType.BEAN) @TransactionAttribute(TransactionAttributeType.REQUIRED) @ProcessApplication(deploymentDescriptors = {"deployment-descriptor-with-custom-filename.xml"}) @Local(ProcessApplicationInterface.class) public class AnnotatedEjbPa extends EjbProcessApplication { @PostConstruct public void start() { deploy(); } @PreDestroy public void stop() { undeploy(); } }
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { ConcurrencyManagement cmAn = (ConcurrencyManagement) ainfo.getAnnotation(); ConcurrencyManagementType cmType = cmAn.value(); for (EjbContext ejbContext : ejbContexts) { EjbDescriptor ejbDesc = ejbContext.getDescriptor(); if (ejbDesc instanceof EjbSessionDescriptor) { EjbSessionDescriptor.ConcurrencyManagementType descCMType; switch(cmType) { case CONTAINER : descCMType = EjbSessionDescriptor.ConcurrencyManagementType.Container; break; case BEAN : descCMType = EjbSessionDescriptor.ConcurrencyManagementType.Bean; break; default : throw new AnnotationProcessorException("Unsupported concurrency management " + "type = " + cmType); } EjbSessionDescriptor sDesc = (EjbSessionDescriptor) ejbDesc; // Set value on descriptor unless it has been set by .xml sDesc.setConcurrencyManagementTypeIfNotSet(descCMType); } } return getDefaultProcessedResult(); }
/** * Custom {@link EjbProcessApplication} with PA lifecycle callbacks * * @author Daniel Meyer * */ @Singleton @Startup @ConcurrencyManagement(ConcurrencyManagementType.BEAN) @TransactionAttribute(TransactionAttributeType.REQUIRED) @ProcessApplication @Local(ProcessApplicationInterface.class) public class CustomEjbProcessApplication extends EjbProcessApplication { @PostDeploy public void postDeploy(ProcessEngine processEngine) { Assert.assertNotNull(processEngine); } @PreUndeploy public void preUnDeploy(ProcessEngine processEngine) { Assert.assertNotNull(processEngine); } }
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { ConcurrencyManagement cmAn = (ConcurrencyManagement) ainfo.getAnnotation(); ConcurrencyManagementType cmType = cmAn.value(); for (EjbContext ejbContext : ejbContexts) { EjbDescriptor ejbDesc = ejbContext.getDescriptor(); if (ejbDesc instanceof EjbSessionDescriptor) { EjbSessionDescriptor.ConcurrencyManagementType descCMType; switch(cmType) { case CONTAINER : descCMType = EjbSessionDescriptor.ConcurrencyManagementType.Container; break; case BEAN : descCMType = EjbSessionDescriptor.ConcurrencyManagementType.Bean; break; default : throw new AnnotationProcessorException("Unsupported concurrency management " + "type = " + cmType); } EjbSessionDescriptor sDesc = (EjbSessionDescriptor) ejbDesc; // Set value on descriptor unless it has been set by .xml sDesc.setConcurrencyManagementTypeIfNotSet(descCMType); } } return getDefaultProcessedResult(); }
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.CONTAINER) public class ClassCacheManagerEJBImpl extends ClassCacheManager { @Override @PreDestroy public void dispose() { super.dispose(); } }
ConcurrencyManagementType concurrencyType = ConcurrencyManagementType.CONTAINER; if (tx != null) { concurrencyType = tx.value();
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.BEAN) public class WeblinkGroupSequenceService extends AbstractService {
javax.ejb.ConcurrencyManagementType concurrencyType = javax.ejb.ConcurrencyManagementType.CONTAINER; if (tx != null) { concurrencyType = tx.value();
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.CONTAINER) public class StatisticsBean implements Statistics {
javax.ejb.ConcurrencyManagementType concurrencyType = javax.ejb.ConcurrencyManagementType.CONTAINER; if (tx != null) { concurrencyType = tx.value();
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.BEAN) public class JoynrStatusMetricsAggregator implements JoynrStatusMetrics, MqttStatusReceiver, StatusReceiver { private AtomicInteger numDiscardedMqttRequest = new AtomicInteger();
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.CONTAINER) @Lock(LockType.READ) public class FormManagerServiceEJBImpl extends FormManagerServiceImpl{ @Lock(LockType.WRITE) @Override public void registerForm(String deploymentId, String key, String formContent) { super.registerForm(deploymentId, key, formContent); } @Lock(LockType.WRITE) @Override public void unRegisterForms(String deploymentId) { super.unRegisterForms(deploymentId); } }
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.CONTAINER) public class ExecutorEventSupportEJBImpl implements ExecutorEventSupport {
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.CONTAINER) @Lock(LockType.READ) public class DeploymentRolesManagerEJBImpl extends DeploymentRolesManager { @Lock(LockType.WRITE) @Override public void addRolesForDeployment(String deploymentId, List<String> roles) { super.addRolesForDeployment(deploymentId, roles); } @Lock(LockType.WRITE) @Override public void removeRolesForDeployment(String deploymentId) { super.removeRolesForDeployment(deploymentId); } @Lock(LockType.READ) @Override public List<String> getDeploymentsForUser(IdentityProvider identityProvider) { return super.getDeploymentsForUser(identityProvider); } }
/** * <p>Singleton bean which allows to execute callbacks in the context the * carrier process archive.</p> * * @author Daniel Meyer * @see ProcessArchive#executeWithinContext(ProcessArchiveCallback) */ // singleton bean guarantees maximum efficiency @Singleton //make sure the container does not synchronize access to this bean @ConcurrencyManagement(ConcurrencyManagementType.BEAN) @TransactionAttribute(TransactionAttributeType.SUPPORTS) public class ProcessArchiveContextExecutor { public <T> T executeWithinContext(ProcessArchiveCallback<T> callback) throws // gets past the EJB container (must be unwrapped by caller) FoxApplicationException { try { return callback.execute(); }catch (Exception e) { throw new FoxApplicationException("Caught Exception", e); } } }
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.CONTAINER) @Lock(LockType.READ) public class DefinitionServiceEJBImpl extends BPMN2DataServiceImpl implements DeploymentEventListener, DefinitionService, DefinitionServiceEJBLocal, DefinitionServiceEJBRemote {
@Singleton @ConcurrencyManagement(ConcurrencyManagementType.BEAN) public class ServiceIdentityManagerBean {