Package javax.resource.spi

Examples of javax.resource.spi.ManagedConnectionFactory


         subject = subjectFactory.createSubject(securityDomain);

         Set<PasswordCredential> credentials = subject.getPrivateCredentials(PasswordCredential.class);
         if (credentials != null && credentials.size() > 0)
         {
            ManagedConnectionFactory pcMcf = getManagedConnectionFactory();
            for (PasswordCredential pc : credentials)
            {
               pc.setManagedConnectionFactory(pcMcf);
            }
         }
View Full Code Here


   public boolean testConnection()
   {
      try
      {
         ConnectionManager cm = (ConnectionManager)getConnectionListenerFactory();
         ManagedConnectionFactory mcf = getManagedConnectionFactory();
      
         Subject subject = createSubject(cm.getSubjectFactory(), cm.getSecurityDomain(), mcf);
 
         if (subject != null)
            return internalTestConnection(subject);
View Full Code Here

         Object obj = connections.next();

         if (obj instanceof HornetQRAManagedConnection)
         {
            HornetQRAManagedConnection mc = (HornetQRAManagedConnection)obj;
            ManagedConnectionFactory mcf = mc.getManagedConnectionFactory();

            if ((mc.getUserName() == null || mc.getUserName() != null && mc.getUserName()
                                                                           .equals(credential.getUserName())) && mcf.equals(this))
            {
               if (cri.equals(mc.getCRI()))
               {
                  if (HornetQRAManagedConnectionFactory.trace)
                  {
View Full Code Here

         Object obj = connections.next();

         if (obj instanceof HornetQRAManagedConnection)
         {
            HornetQRAManagedConnection mc = (HornetQRAManagedConnection)obj;
            ManagedConnectionFactory mcf = mc.getManagedConnectionFactory();

            if ((mc.getUserName() == null || mc.getUserName() != null && mc.getUserName()
                                                                           .equals(credential.getUserName())) && mcf.equals(this))
            {
               if (cri.equals(mc.getCRI()))
               {
                  if (HornetQRAManagedConnectionFactory.trace)
                  {
View Full Code Here

            if (obj instanceof JmsManagedConnection) {
                // This is one from the pool
                JmsManagedConnection mc = (JmsManagedConnection) obj;

                // Check if we even created this on
                ManagedConnectionFactory mcf = mc.getManagedConnectionFactory();

                // Only admit a connection if it has the same username as our
                // asked for creds

                // FIXME, Here we have a problem, jms connection
                // may be anonymous, have a user name

                if ((mc.getUserName() == null || (mc.getUserName() != null && mc.getUserName().equals(cred.name)))
                        && mcf.equals(this)) {
                    // Now check if ConnectionInfo equals
                    if (info.equals(mc.getInfo())) {

                        if (trace)
                            log.trace("Found matching connection: " + mc);
View Full Code Here

      poolParams.backgroundInterval = backgroundValidationInterval;
   }

   protected void startService() throws Exception
   {
      ManagedConnectionFactory mcf = null;
     
      if(managedConnectionFactoryName == null)
      {
         throw new org.jboss.deployers.spi.DeploymentException("ManagedConnectionFactory is not set.");         
     
View Full Code Here

         {
            // This is one from the pool
            JmsManagedConnection mc = (JmsManagedConnection) obj;

            // Check if we even created this on
            ManagedConnectionFactory mcf = mc.getManagedConnectionFactory();

            // Only admit a connection if it has the same username as our
            // asked for creds

            // FIXME, Here we have a problem, jms connection
            // may be anonymous, have a user name

            if ((mc.getUserName() == null || (mc.getUserName() != null && mc.getUserName().equals(cred.name)))
                  && mcf.equals(this))
            {
               // Now check if ConnectionInfo equals
               if (info.equals(mc.getInfo()))
               {
View Full Code Here

            Map<String, Object> unset = serviceRecipe.getUnsetProperties();
            unset.remove("threadPoolSize");
            logUnusedProperties(unset, serviceInfo)
                    ;
        } else if (service instanceof ManagedConnectionFactory) {
            ManagedConnectionFactory managedConnectionFactory = (ManagedConnectionFactory) service;

            // connection manager is constructed via a recipe so we automatically expose all cmf properties
            ObjectRecipe connectionManagerRecipe = new ObjectRecipe(GeronimoConnectionManagerFactory.class, "create");
            connectionManagerRecipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
            connectionManagerRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
View Full Code Here

    private static Map<String, Object> getOptions(Map<String, Object> options, ManagedConnectionFactoryWrapper managedConnectionFactoryWrapper) {
        if (options == null) {
            options = new HashMap<String, Object>();
        }
        ManagedConnectionFactory managedConnectionFactory = managedConnectionFactoryWrapper.$getManagedConnectionFactory();
        options.put(MANAGED_CONNECTION_FACTORY_OPTION, managedConnectionFactory);
        return options;
    }
View Full Code Here

         subject = subjectFactory.createSubject(securityDomain);

         Set<PasswordCredential> credentials = subject.getPrivateCredentials(PasswordCredential.class);
         if (credentials != null && credentials.size() > 0)
         {
            ManagedConnectionFactory pcMcf = getManagedConnectionFactory();
            for (PasswordCredential pc : credentials)
            {
               pc.setManagedConnectionFactory(pcMcf);
            }
         }
View Full Code Here

TOP

Related Classes of javax.resource.spi.ManagedConnectionFactory

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.