Exemplo n.º 1
0
 /**
  * @param type Resource type.
  * @return Resource of defined type.
  */
 protected Resource findResource(String type) {
   Resource foundResource = null;
   for (Resource resource : ((LocalConfiguration) configuration).getResources()) {
     if (type.equals(resource.getType())) {
       foundResource = resource;
     }
   }
   return foundResource;
 }
  @Override
  protected void addConfigurationScriptProperties(Map<String, String> propertiesMap) {
    propertiesMap.put("cargo.resource.id", resource.getId());
    propertiesMap.put("cargo.resource.name", resource.getName());

    Resource jmsModule = findResource(WebLogicConfigurationEntryType.JMS_MODULE);
    propertiesMap.put("cargo.resource.jms.module.id", jmsModule.getId());

    Resource jmsSubdeployment = findResource(WebLogicConfigurationEntryType.JMS_SUBDEPLOYMENT);
    propertiesMap.put("cargo.resource.jms.subdeployment.id", jmsSubdeployment.getId());
  }