Tabnine Logo
AutoConfig.getResourceIds
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.geronimo.ext.openejb/openejb-core

private String firstMatching(String type, Properties required, AppResources appResources) {
  List<String> resourceIds = getResourceIds(appResources, type, required);
  String idd = null;
  if (resourceIds.size() > 0) {
    idd = resourceIds.get(0);
  }
  return idd;
}
origin: org.apache.tomee/openejb-core

private String firstMatching(final String prefix, final String type, final Properties required, final AppResources appResources) {
  final List<String> resourceIds = getResourceIds(appResources, type, required);
  if(resourceIds.isEmpty()){
    return null;
  }
  return Collections.min(resourceIds, new Comparator<String>() { // sort from webapp to global resources
    @Override
    public int compare(final String o1, final String o2) { // don't change global order, just put app scoped resource before others
      if (o1.startsWith(prefix) && o2.startsWith(prefix)) {
        return resourceIds.indexOf(o1) - resourceIds.indexOf(o2);
      } else if (o1.startsWith(prefix)) {
        return -1;
      } else if (o2.startsWith(prefix)) {
        return 1;
      }
      // make it stable with prefixed comparison + keep existing ordering (bck compat)
      return resourceIds.indexOf(o1) - resourceIds.indexOf(o2);
    }
  });
}
origin: org.apache.openejb/openejb-core

private String findResourceId(final String resourceId, final String type, final Properties required, final AppResources appResources) {
  if (resourceId == null) {
    return null;
  }
  return findResourceId(getResourceIds(appResources, type, required), resourceId);
}
origin: org.apache.tomee/openejb-core

private String findResourceId(final String resourceId, final String type, final Properties required, final AppResources appResources) {
  if (resourceId == null) {
    return null;
  }
  return findResourceId(getResourceIds(appResources, type, required), resourceId);
}
origin: org.apache.openejb/openejb-core

private String firstMatching(final String prefix, final String type, final Properties required, final AppResources appResources) {
  final List<String> resourceIds = new ArrayList<String>(getResourceIds(appResources, type, required));
  Collections.sort(resourceIds, new Comparator<String>() { // sort from webapp to global resources
    @Override
    public int compare(final String o1, final String o2) { // don't change global order, just put app scoped resource before others
      if (o1.startsWith(prefix) && o2.startsWith(prefix)) {
        return resourceIds.indexOf(o1) - resourceIds.indexOf(o2);
      } else if (o1.startsWith(prefix)) {
        return -1;
      } else if (o2.startsWith(prefix)) {
        return 1;
      }
      // make it stable with prefixed comparison + keep existing ordering (bck compat)
      return resourceIds.indexOf(o1) - resourceIds.indexOf(o2);
    }
  });
  String idd = null;
  if (resourceIds.size() > 0) {
    idd = resourceIds.get(0);
  }
  return idd;
}
origin: org.apache.geronimo.ext.openejb/openejb-core

private String findResourceId(String resourceId, String type, Properties required, AppResources appResources) {
  if (resourceId == null) return null;
  resourceId = normalizeResourceId(resourceId);
  // check for existing resource with specified resourceId
  List<String> resourceIds = getResourceIds(appResources, type, required);
  for (String id : resourceIds) {
    if (id.equalsIgnoreCase(resourceId)) return id;
  }
  // check for existing resource with shortName
  String shortName = toShortName(resourceId);
  for (String id : resourceIds) {
    if (id.equalsIgnoreCase(shortName)) return id;
  }
  return null;
}
origin: org.apache.geronimo.ext.openejb/openejb-core

List<String> resourceEnvIds = getResourceIds(appResources, type, null);
for (String id : resourceEnvIds) {
  if (id.equalsIgnoreCase(resourceId)) return id;
origin: org.apache.tomee/openejb-core

final List<String> resourceEnvIds = getResourceIds(appResources, type, null);
for (final String id : resourceEnvIds) {
  if (id.equalsIgnoreCase(resourceId)) {
origin: org.apache.openejb/openejb-core

final List<String> resourceEnvIds = getResourceIds(appResources, type, null);
for (final String id : resourceEnvIds) {
  if (id.equalsIgnoreCase(resourceId)) {
org.apache.openejb.configAutoConfiggetResourceIds

Popular methods of AutoConfig

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

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now