Codota Logo
AutoConfig.getResourceId
Code IndexAdd Codota to your IDE (free)

How to use
getResourceId
method
in
org.apache.openejb.config.AutoConfig

Best Java code snippets using org.apache.openejb.config.AutoConfig.getResourceId (Showing top 15 results out of 315)

  • Common ways to obtain AutoConfig
private void myMethod () {
AutoConfig a =
  • Codota IconConfigurationFactory configFactory;new AutoConfig(configFactory)
  • Smart code suggestions by Codota
}
origin: org.apache.geronimo.ext.openejb/openejb-core

private String getResourceId(String beanName, String resourceId, String type, AppResources appResources) throws OpenEJBException {
  return getResourceId(beanName, resourceId, type, null, appResources);
}
origin: org.apache.openejb/openejb-core

private String getResourceId(final String beanName, final String resourceId, final String type, final AppResources appResources) throws OpenEJBException {
  return getResourceId(beanName, resourceId, type, null, appResources);
}
origin: org.apache.tomee/openejb-core

private String getResourceId(final String beanName, final String resourceId, final String type, final AppResources appResources) throws OpenEJBException {
  return getResourceId(beanName, resourceId, type, null, appResources);
}
origin: org.apache.geronimo.ext.openejb/openejb-core

private String installResource(String beanName, ResourceInfo resourceInfo) throws OpenEJBException {
  String resourceAdapterId = resourceInfo.properties.getProperty("ResourceAdapter");
  if (resourceAdapterId != null) {
    String newResourceId = getResourceId(beanName, resourceAdapterId, null, null);
    if (resourceAdapterId != newResourceId) {
      resourceInfo.properties.setProperty("ResourceAdapter", newResourceId);
    }
  }
  String dataSourceId = resourceInfo.properties.getProperty("DataSource");
  if (dataSourceId != null && dataSourceId.length() > 0) {
    String newResourceId = getResourceId(beanName, dataSourceId, null, null);
    if (dataSourceId != newResourceId) {
      resourceInfo.properties.setProperty("DataSource", newResourceId);
    }
  }
  configFactory.install(resourceInfo);
  return resourceInfo.id;
}
origin: org.apache.tomee/openejb-core

private String installResource(final String beanName, final ResourceInfo resourceInfo) throws OpenEJBException {
  final String resourceAdapterId = resourceInfo.properties.getProperty("ResourceAdapter");
  if (resourceAdapterId != null) {
    final String newResourceId = getResourceId(beanName, resourceAdapterId, null, null);
    if (!resourceAdapterId.equals(newResourceId)) {
      resourceInfo.properties.setProperty("ResourceAdapter", newResourceId);
    }
  }
  final String dataSourceId = resourceInfo.properties.getProperty("DataSource");
  if (dataSourceId != null && dataSourceId.length() > 0) {
    final String newResourceId = getResourceId(beanName, dataSourceId, null, null);
    if (!dataSourceId.equals(newResourceId)) {
      resourceInfo.properties.setProperty("DataSource", newResourceId);
    }
  }
  configFactory.install(resourceInfo);
  return resourceInfo.id;
}
origin: org.apache.openejb/openejb-core

private String installResource(final String beanName, final ResourceInfo resourceInfo) throws OpenEJBException {
  final String resourceAdapterId = resourceInfo.properties.getProperty("ResourceAdapter");
  if (resourceAdapterId != null) {
    final String newResourceId = getResourceId(beanName, resourceAdapterId, null, null);
    if (!resourceAdapterId.equals(newResourceId)) {
      resourceInfo.properties.setProperty("ResourceAdapter", newResourceId);
    }
  }
  final String dataSourceId = resourceInfo.properties.getProperty("DataSource");
  if (dataSourceId != null && dataSourceId.length() > 0) {
    final String newResourceId = getResourceId(beanName, dataSourceId, null, null);
    if (!dataSourceId.equals(newResourceId)) {
      resourceInfo.properties.setProperty("DataSource", newResourceId);
    }
  }
  configFactory.install(resourceInfo);
  return resourceInfo.id;
}
origin: org.apache.openejb/openejb-core

private String createContainer(final Class<? extends ContainerInfo> containerInfoType, final EjbDeployment ejbDeployment, final EnterpriseBean bean) throws OpenEJBException {
  if (!autoCreateContainers) {
    throw new OpenEJBException("A container of type " + getType(bean) + " must be declared in the configuration file for bean: " + bean.getEjbName());
  }
  // get the container info (data used to build the container)
  final ContainerInfo containerInfo = configFactory.configureService(containerInfoType);
  logger.info("Auto-creating a container for bean " + ejbDeployment.getDeploymentId() + ": Container(type=" + getType(bean) + ", id=" + containerInfo.id + ")");
  // if the is an MDB container we need to resolve the resource adapter
  final String resourceAdapterId = containerInfo.properties.getProperty("ResourceAdapter");
  if (resourceAdapterId != null) {
    final String newResourceId = getResourceId(ejbDeployment.getDeploymentId(), resourceAdapterId, null, null);
    if (resourceAdapterId.equals(newResourceId)) {
      containerInfo.properties.setProperty("ResourceAdapter", newResourceId);
    }
  }
  // install the container
  configFactory.install(containerInfo);
  return containerInfo.id;
}
origin: org.apache.tomee/openejb-core

private String createContainer(final Class<? extends ContainerInfo> containerInfoType, final EjbDeployment ejbDeployment, final EnterpriseBean bean) throws OpenEJBException {
  if (!autoCreateContainers) {
    throw new OpenEJBException("A container of type " + getType(bean) + " must be declared in the configuration file for bean: " + bean.getEjbName());
  }
  // get the container info (data used to build the container)
  final ContainerInfo containerInfo = configFactory.configureService(containerInfoType);
  logger.info("Auto-creating a container for bean " + ejbDeployment.getDeploymentId() + ": Container(type=" + getType(bean) + ", id=" + containerInfo.id + ")");
  // if the is an MDB container we need to resolve the resource adapter
  final String resourceAdapterId = containerInfo.properties.getProperty("ResourceAdapter");
  if (resourceAdapterId != null) {
    final String newResourceId = getResourceId(ejbDeployment.getDeploymentId(), resourceAdapterId, null, null);
    if (resourceAdapterId.equals(newResourceId)) {
      containerInfo.properties.setProperty("ResourceAdapter", newResourceId);
    }
  }
  // install the container
  configFactory.install(containerInfo);
  return containerInfo.id;
}
origin: org.apache.geronimo.ext.openejb/openejb-core

private String createContainer(Class<? extends ContainerInfo> containerInfoType, EjbDeployment ejbDeployment, EnterpriseBean bean) throws OpenEJBException {
  if (!autoCreateContainers) {
    throw new OpenEJBException("A container of type " + getType(bean) + " must be declared in the configuration file for bean: " + bean.getEjbName());
  }
  // get the container info (data used to build the container)
  ContainerInfo containerInfo = configFactory.configureService(containerInfoType);
  logger.info("Auto-creating a container for bean " + ejbDeployment.getDeploymentId() + ": Container(type=" + getType(bean) + ", id=" + containerInfo.id + ")");
  // if the is an MDB container we need to resolve the resource adapter
  String resourceAdapterId = containerInfo.properties.getProperty("ResourceAdapter");
  if (resourceAdapterId != null) {
    String newResourceId = getResourceId(ejbDeployment.getDeploymentId(), resourceAdapterId, null, null);
    if (resourceAdapterId != newResourceId) {
      containerInfo.properties.setProperty("ResourceAdapter", newResourceId);
    }
  }
  // install the container
  configFactory.install(containerInfo);
  return containerInfo.id;
}
origin: org.apache.tomee/openejb-core

        appResources);
      if (newId != null) { // app scoped resources, try to find it without creating it first
        id = getResourceId(ejbModule.getModuleId(), newId, refType, appResources);
      } else {
        id = getResourceId(ejbDeployment.getDeploymentId(), id, refType, appResources);
      id = getResourceId(ejbDeployment.getDeploymentId(), id, refType, appResources);
  ejbDeployment.addResourceLink(link);
} else {
  final String id = getResourceId(ejbDeployment.getDeploymentId(), link.getResId(), refType, appResources);
  link.setResId(id);
  link.setResRefName(refName);
origin: org.apache.openejb/openejb-core

          appResources);
      if (newId != null) { // app scoped resources, try to find it without creating it first
        id = getResourceId(ejbModule.getModuleId(), newId, refType, appResources);
      } else {
        id = getResourceId(ejbDeployment.getDeploymentId(), id, refType, appResources);
      id = getResourceId(ejbDeployment.getDeploymentId(), id, refType, appResources);
  ejbDeployment.addResourceLink(link);
} else {
  final String id = getResourceId(ejbDeployment.getDeploymentId(), link.getResId(), refType, appResources);
  link.setResId(id);
  link.setResRefName(refName);
origin: org.apache.geronimo.ext.openejb/openejb-core

private void processResourceRef(ResourceRef ref, EjbDeployment ejbDeployment, AppResources appResources) throws OpenEJBException {
  // skip destinations with a global jndi name
  String mappedName = ref.getMappedName();
  if (mappedName == null) mappedName = "";
  if ((mappedName).startsWith("jndi:")){
    return;
  }
  String refName = ref.getName();
  String refType = ref.getType();
  // skip references such as URLs which are automatically handled by the server
  if (ignoredReferenceTypes.contains(refType)) {
    return;
  }
  ResourceLink link = ejbDeployment.getResourceLink(refName);
  if (link == null) {
    String id = (mappedName.length() == 0) ? ref.getName() : mappedName;
    id = getResourceId(ejbDeployment.getDeploymentId(), id, refType, appResources);
    logger.info("Auto-linking resource-ref '" + refName + "' in bean " + ejbDeployment.getDeploymentId() + " to Resource(id=" + id + ")");
    link = new ResourceLink();
    link.setResId(id);
    link.setResRefName(refName);
    ejbDeployment.addResourceLink(link);
  } else {
    String id = getResourceId(ejbDeployment.getDeploymentId(), link.getResId(), refType, appResources);
    link.setResId(id);
    link.setResRefName(refName);
  }
}
origin: org.apache.geronimo.ext.openejb/openejb-core

destinationId = getResourceId(moduleId, destinationId, ref.getType(), appResources);
ref.setMappedName(destinationId);
origin: org.apache.tomee/openejb-core

  destinationId = getResourceId(moduleId, destinationId, refType, appResources);
} catch (final OpenEJBException ex) {
  if (!(ref instanceof ContextRef)) {
origin: org.apache.openejb/openejb-core

  destinationId = getResourceId(moduleId, destinationId, refType, appResources);
} catch (final OpenEJBException ex) {
  if (!(ref instanceof ContextRef)) {
org.apache.openejb.configAutoConfiggetResourceId

Popular methods of AutoConfig

  • <init>
  • autoCreateContainers
  • autoCreateResources
  • findResourceId
  • autoCreateResource
  • checkUnitDataSourceRefs
  • copy
  • createContainer
  • deploy
  • findResourceProviderId
  • firstMatching
  • getResourceEnvId
  • firstMatching,
  • getResourceEnvId,
  • getResourceIds,
  • getType,
  • getUsableContainer,
  • installResource,
  • isJms,
  • logAutoCreateResource,
  • normalizeResourceId

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now