Package org.jboss.switchboard.impl.resource

Examples of org.jboss.switchboard.impl.resource.LinkRefResource


   public Resource provide(DeploymentUnit deploymentUnit, BeanManagerRefType type)
   {
      // TODO Auto-generated method stub
      if (deploymentUnit.getAttachment(DeployersUtils.WELD_FILES) != null)
      {
         return new LinkRefResource(JndiUtils.getGlobalBeanManagerPath(moduleInformer, deploymentUnit));
      }
      else
      {
         return new IndependentResource(null);
      }
View Full Code Here


   {
      // first check lookup name
      String lookupName = messageDestRef.getLookupName();
      if (lookupName != null && !lookupName.trim().isEmpty())
      {
         return new LinkRefResource(lookupName);
      }

      // now check mapped name
      String mappedName = messageDestRef.getMappedName();
      if (mappedName != null && !mappedName.trim().isEmpty())
      {
         return new LinkRefResource(mappedName);
      }
     
      // now check (JBoss specific) jndi name!
      String jndiName = messageDestRef.getJNDIName();
      if (jndiName != null && !jndiName.trim().isEmpty())
      {
         return new LinkRefResource(jndiName);
      }
     
      // Now check if a message-destination link is specified.
      // The "link" itself is a logical name to the destination, so we'll
      // use a resolver to resolve a jndi name out of it.
      String messageDestLink = messageDestRef.getMessageDestinationLink();
      if (messageDestLink != null && !messageDestLink.trim().isEmpty())
      {
         if (this.messageDestinationResolver == null)
         {
            logger.warn("Cannot resolve message-destination link: " + messageDestLink
                  + " for message-destination-ref: " + messageDestRef.getName() + " due to absence of a "
                  + MessageDestinationReferenceResolver.class.getName());
         }
         else
         {
            // the DU which depends on this message-destination-ref
            DeploymentUnit dependentDU = unit;
            // the MessageDestinationReferenceResolver works on non-component deployment units.
            // So if we are currently processing component DUs (like we do for EJBs), then pass the
            // component DUs parent during resolution.
            if (unit.isComponent())
            {
               dependentDU = unit.getParent();
            }
            String resolvedJNDIName = this.messageDestinationResolver.resolveMessageDestinationJndiName(dependentDU, messageDestLink);
            logger.debug("Resolved jndi-name: " + resolvedJNDIName + " for message-destination link: "
                  + messageDestLink + " in message-destination-ref: " + messageDestRef.getName());
            if (resolvedJNDIName != null && !resolvedJNDIName.trim().isEmpty())
            {
               return new LinkRefResource(resolvedJNDIName);
            }
           
         }
      }
      throw new RuntimeException("Cannot provide a resource for message-destination-ref: " + messageDestRef.getName() + " in unit: " + unit);
View Full Code Here

   {
      // let's check if there's any explicit jndi/mapped/lookup name
      String lookupName = resRef.getLookupName();
      if (lookupName != null && !lookupName.trim().isEmpty())
      {
         return new LinkRefResource(lookupName, null, resRef.isIgnoreDependency());
      }

      // now check mapped name
      String mappedName = resRef.getMappedName();
      if (mappedName != null && !mappedName.trim().isEmpty())
      {
         return new LinkRefResource(mappedName, null, resRef.isIgnoreDependency());
      }
     
      // now check (JBoss specific) jndi name!
      String jndiName = resRef.getJNDIName();
      if (jndiName != null && !jndiName.trim().isEmpty())
      {
         return new LinkRefResource(jndiName, null, resRef.isIgnoreDependency());
      }
      String internalJndiNameWithoutNamespace = DataSourceDeployerHelper.normalizeJndiName(resRef.getName(), unit, informer);
      String targetJndiName = "java:/" + internalJndiNameWithoutNamespace;
      // the binder which binds to the internal JBoss specific jndi name
      String binderName = "jboss.jca:name=" + internalJndiNameWithoutNamespace + ",service=DataSourceBinding";
View Full Code Here

   }

   @Override
   public Resource provide(DeploymentUnit unit, JBossResourceEnvRefType resEnvRef)
   {
      return new LinkRefResource("UserTransaction");
   }
View Full Code Here

    *
    */
   @Override
   public Resource provide(DeploymentUnit context, JBossResourceEnvRefType type)
   {
      return new LinkRefResource(this.corbaJndiName);
   }
View Full Code Here

      return UserTransactionRefType.class;
   }

   public Resource provide(DeploymentUnit context, UserTransactionRefType userTransactionRef)
   {
      return new LinkRefResource("UserTransaction");
   }
View Full Code Here

{

   @Override
   public Resource provide(DeploymentUnit unit, JBossResourceEnvRefType resEnvRef)
   {
      return new LinkRefResource("java:TransactionSynchronizationRegistry");
   }
View Full Code Here

   public Resource provide(DeploymentUnit context, ORBRefType type)
   {
      // As per JavaEE 6 spec, section EE.9.6, java:comp/ORB is optional.
      // So let's create a LinkRefResource with ignoreDependency = true, so
      // that the deployment doesn't fail in the absence of ORB
      return new LinkRefResource(this.corbaJndiName, null, true);
   }
View Full Code Here

    * Returns a {@link Resource resource} for {@link ORB} resource-ref
    */
   @Override
   public Resource provide(DeploymentUnit context, JBossResourceRefType type)
   {
      return new LinkRefResource(this.corbaJndiName);
   }
View Full Code Here

      return TransactionSynchronizationRegistryRefType.class;
   }

   public Resource provide(DeploymentUnit context, TransactionSynchronizationRegistryRefType type)
   {
      return new LinkRefResource("java:TransactionSynchronizationRegistry");
   }
View Full Code Here

TOP

Related Classes of org.jboss.switchboard.impl.resource.LinkRefResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.