javax.ejb.EJB.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(183)

本文整理了Java中javax.ejb.EJB.<init>()方法的一些代码示例,展示了EJB.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EJB.<init>()方法的具体详情如下:
包路径:javax.ejb.EJB
类名称:EJB
方法名:<init>

EJB.<init>介绍

暂无

代码示例

代码示例来源:origin: jersey/jersey

/**
 * JAX-RS resource used to reload the first application.
 * This resource is only registered inside the second application.
 *
 * @author Jakub Podlesak (jakub.podlesak at oracle.com)
 */
@Stateless
@Path("reload")
public class ReloaderResource {

  @EJB EjbReloaderService ejbReloaderService;

  @GET
  public void reloadTheOtherApp() {
    ejbReloaderService.reload();
  }
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * This is a CDI bean delegating to a SLSB from the same deployment
 * 
 * @author Daniel Meyer
 *
 */
@Named("SLSBClientDelegate")
public class SLSBClientDelegate implements JavaDelegate {
 
 @EJB
 private JavaDelegate bean;

 public void execute(DelegateExecution execution) throws Exception {
  bean.execute(execution);
 }

}

代码示例来源:origin: IQSS/dataverse

@Named
@Stateless
public class BeanValidationServiceBean {

  @EJB
  DatasetServiceBean datasetService;

  @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
  public void validateDatasets() {
    for (Dataset dataset : datasetService.findAll()) {
      for (DatasetVersion version : dataset.getVersions()) {
        for (FileMetadata fileMetadata : version.getFileMetadatas()) {
        }
      }
    }
  }

}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * 
 * @author Daniel Meyer
 *
 */
@Named
public class InvocationCounterDelegateBeanLocal implements JavaDelegate {
 
 @EJB(lookup="java:global/" +
   "service/" +
   "InvocationCounterServiceBean!org.camunda.bpm.integrationtest.functional.ejb.request.beans.InvocationCounterServiceLocal")
 private InvocationCounterServiceLocal invocationCounterService;

 public void execute(DelegateExecution execution) throws Exception {    
  execution.setVariable("invocationCounter", invocationCounterService.getNumOfInvocations());      
 }
 
 
}

代码示例来源:origin: IQSS/dataverse

@Stateless
@Named
public class RepositoryStorageAbstractionLayerPage {

  private static final Logger logger = Logger.getLogger(RepositoryStorageAbstractionLayerPage.class.getCanonicalName());

  @EJB
  SettingsServiceBean settingsService;
  @EJB
  StorageSiteServiceBean storageSiteServiceBean;

  public String getLocalDataAccessDirectory(DatasetVersion datasetVersion) {
    String localDataAccessParentDir = settingsService.getValueForKey(SettingsServiceBean.Key.LocalDataAccessPath);
    return RepositoryStorageAbstractionLayerUtil.getLocalDataAccessDirectory(localDataAccessParentDir, datasetVersion.getDataset());
  }

  public List<RsyncSite> getRsyncSites(DatasetVersion datasetVersion) {
    List<StorageSite> storageSites = storageSiteServiceBean.findAll();
    JsonArray storageSitesAsJson = RepositoryStorageAbstractionLayerUtil.getStorageSitesAsJson(storageSites);
    return RepositoryStorageAbstractionLayerUtil.getRsyncSites(datasetVersion.getDataset(), storageSitesAsJson);
  }

  public String getVerifyDataCommand(DatasetVersion datasetVersion) {
    return RepositoryStorageAbstractionLayerUtil.getVerifyDataCommand(datasetVersion.getDataset());
  }

}

代码示例来源:origin: jersey/jersey

/**
 * JAX-RS resource backed by a stateless EJB bean.
 *
 * @author Jakub Podlesak (jakub.podlesak at oracle.com)
 */
@Stateless
@Path("stateless")
public class StatelessResource {

  @EJB EjbCounterResource counter;
  @Context UriInfo uriInfo;

  @GET
  public int getCount() {
    return counter.getCount();
  }

  @GET
  @Path("{uriInfo}")
  public String getPath() {
    return uriInfo != null ? uriInfo.getPath() : "uri info is null";
  }
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * This is a CDI bean delegating to a SingletonBeanClientDelegate from the same deployment
 * 
 * @author Daniel Meyer
 *
 */
@Named("SingletonBeanClientDelegate")
public class SingletonBeanClientDelegate implements JavaDelegate {
 
 @EJB
 private JavaDelegate bean;

 public void execute(DelegateExecution execution) throws Exception {
  bean.execute(execution);
 }

}

代码示例来源:origin: jamesagnew/hapi-fhir

/**
 * Conformance Rest Service
 * 
 * @author Peter Van Houte
 */
 // START SNIPPET: jax-rs-conformance
@Path("")
@Stateless
@Produces({ MediaType.APPLICATION_JSON, Constants.CT_FHIR_JSON, Constants.CT_FHIR_XML })
public class JaxRsConformanceProvider extends AbstractJaxRsConformanceProvider {

 @EJB
 private JaxRsPatientRestProvider provider;

 public JaxRsConformanceProvider() {
  super("My Server Description", "My Server Name", "My Server Version");
 }

 @Override
 protected ConcurrentHashMap<Class<? extends IResourceProvider>, IResourceProvider> getProviders() {
  ConcurrentHashMap<Class<? extends IResourceProvider>, IResourceProvider> map = new ConcurrentHashMap<Class<? extends IResourceProvider>, IResourceProvider>();
  map.put(JaxRsConformanceProvider.class, this);
  map.put(JaxRsPatientRestProvider.class, provider);
  return map;
 }
}
// END SNIPPET: jax-rs-conformance

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * This is a CDI bean delegating to a SFSB from the same deployment
 * 
 * @author Daniel Meyer
 *
 */
@Named("SFSBClientDelegate")
public class SFSBClientDelegate implements JavaDelegate {
 
 @EJB
 private JavaDelegate bean;

 public void execute(DelegateExecution execution) throws Exception {
  bean.execute(execution);
 }

}

代码示例来源:origin: camunda/camunda-bpm-platform

@Stateless(name="ProcessApplicationService", mappedName="ProcessApplicationService")
@Local(ProcessApplicationService.class)
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class EjbProcessApplicationService implements ProcessApplicationService {
 @EJB
 protected EjbBpmPlatformBootstrap ejbBpmPlatform;

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * A CDI bean delegating to the local business 
 * interface of a SLSB from a different application.
 * 
 * @author Daniel Meyer
 *
 */
@Named
public class LocalSLSBClientDelegateBean implements JavaDelegate {
 
 @EJB(lookup="java:global/service/LocalSLSBean!org.camunda.bpm.integrationtest.functional.ejb.local.bean.BusinessInterface")
 private BusinessInterface businessInterface;

 @Override
 public void execute(DelegateExecution execution) throws Exception {
  execution.setVariable("result", businessInterface.doBusiness());
 }

}

代码示例来源:origin: camunda/camunda-bpm-platform

@Stateless(name="ProcessEngineService", mappedName="ProcessEngineService")
@Local(ProcessEngineService.class)
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class EjbProcessEngineService implements ProcessEngineService {
 @EJB
 protected EjbBpmPlatformBootstrap ejbBpmPlatform;

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * A CDI bean delegating to the local business 
 * interface of a Singleton Bean from a different application.
 * 
 * @author Daniel Meyer
 *
 */
@Named
public class LocalSingletonBeanClientDelegateBean implements JavaDelegate {
 
 @EJB(lookup="java:global/service/LocalSingletonBean!org.camunda.bpm.integrationtest.functional.ejb.local.bean.BusinessInterface")
 private BusinessInterface businessInterface;

 @Override
 public void execute(DelegateExecution execution) throws Exception {
  execution.setVariable("result", businessInterface.doBusiness());
 }

}

代码示例来源:origin: be.fedict.eid-applet/eid-applet-test-model

@Stateless
@EJB(name = "java:global/test/IdentityServiceBean", beanInterface = IdentityService.class)
public class IdentityServiceBean implements IdentityService {

  private static final Log LOG = LogFactory.getLog(IdentityServiceBean.class);

  public IdentityRequest getIdentityRequest() {
    LOG.debug("getIdentityRequest");
    IdentityRequest identityRequest = new IdentityRequest(true, true, true, true, true);
    return identityRequest;
  }
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * A CDI bean delegating to the local business
 * interface of a SLSB from a different application.
 *
 * @author Daniel Meyer
 *
 */
@Named
public class InvokeStartProcessDelegateSLSB implements JavaDelegate {

 @EJB(lookup="java:global/service/StartProcessSLSB!org.camunda.bpm.integrationtest.functional.ejb.local.bean.StartProcessInterface")
 private StartProcessInterface businessInterface;

 @Override
 public void execute(DelegateExecution execution) throws Exception {
  execution.setVariable("result", businessInterface.doStartProcess());
 }

}

代码示例来源:origin: be.fedict.eid-applet/eid-applet-test-model

@Stateless
@EJB(name = "java:global/test/AuthenticationRevokeServiceBean", beanInterface = AuthenticationRevokeService.class)
public class AuthenticationRevokeServiceBean implements AuthenticationRevokeService {

  private static final Log LOG = LogFactory.getLog(AuthenticationRevokeServiceBean.class);

  public void validateCertificateChain(List<X509Certificate> certificateChain) throws SecurityException {
    LOG.debug("validate certificate chain: " + certificateChain);
    throw new RevokedCertificateSecurityException();
  }
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * A CDI bean delegating to the local business 
 * interface of a SFSB from a different application.
 * 
 * @author Daniel Meyer
 *
 */
@Named
public class LocalSFSBClientDelegateBean implements JavaDelegate {
 
 @EJB(lookup="java:global/service/LocalSFSBean!org.camunda.bpm.integrationtest.functional.ejb.local.bean.BusinessInterface")
 private BusinessInterface businessInterface;

 @Override
 public void execute(DelegateExecution execution) throws Exception {
  execution.setVariable("result", businessInterface.doBusiness());
 }

}

代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl

@Stateless
public class SuperInjectedSessionBean {

  @EJB
  protected DeluxeHenHouseLocal deluxeHenHouse;

}

代码示例来源:origin: IQSS/dataverse

@Named
@Dependent
public class FileRecordProcessor implements ItemProcessor {
  JobContext jobContext;
  @EJB
  DatasetServiceBean datasetServiceBean;
  @EJB
  DataFileServiceBean dataFileServiceBean;

代码示例来源:origin: be.fedict.eid-applet/eid-applet-test-model

@Stateless
@EJB(name = "java:global/test/InsecureClientEnvironmentBean", beanInterface = InsecureClientEnvironment.class)
public class InsecureClientEnvironmentBean implements InsecureClientEnvironment {

  private static final Log LOG = LogFactory.getLog(InsecureClientEnvironmentBean.class);

  public void checkSecureClientEnvironment(String javaVersion, String javaVendor, String osName, String osArch,
      String osVersion, String userAgent, String navigatorAppName, String navigatorAppVersion,
      String navigatorUserAgent, String remoteAddress, Integer sslKeySize, String sslCipherSuite,
      List<String> readerList) throws InsecureClientEnvironmentException {
    LOG.debug("checking secure client environment");
    throw new InsecureClientEnvironmentException();
  }
}

相关文章