Package com.sun.enterprise.connectors

Examples of com.sun.enterprise.connectors.ActiveInboundResourceAdapter


                    if (_logger.isLoggable(Level.FINE)) {
                        _logger.log( Level.FINE, ex.toString() , ex);
                    }
                }
               
                ActiveInboundResourceAdapter activeInboundRA = (ActiveInboundResourceAdapter) creg
                        .getActiveResourceAdapter(raMid);
               
                assert activeInboundRA instanceof ActiveInboundResourceAdapter;
               
                boolean isSystemJmsRA = false;
                if (activeInboundRA instanceof ActiveJmsResourceAdapter) {
                    isSystemJmsRA = true;
                }
               
                javax.resource.spi.ResourceAdapter resourceAdapter = activeInboundRA
                        .getResourceAdapter();
                // activationSpecList represents the ActivationSpec[] that would be
                // sent to the getXAResources() method.
                ArrayList activationSpecList = new ArrayList();
       
View Full Code Here


        }

        if (!(activeRar instanceof ActiveInboundResourceAdapter)) {
            throw new Exception("Resource Adapter selected doesn't support Inflow");
        }
        ActiveInboundResourceAdapter rar = (ActiveInboundResourceAdapter) activeRar;

        //the resource adapter this MDB client is deployed to
        ResourceAdapter ra =  rar.getResourceAdapter();
       
        ConnectorDescriptor desc = rar.getDescriptor();
       
        String msgListenerType = getDescriptor().getMessageListenerType();
        if (msgListenerType == null || "".equals(msgListenerType))
          msgListenerType = "javax.jms.MessageListener";

        Iterator i =
            desc.getInboundResourceAdapter().getMessageListeners().iterator();

        MessageListener msgListener = null;
        while (i.hasNext()) {
            msgListener = (MessageListener) i.next();
            if (msgListenerType.equals(msgListener.getMessageListenerType()))
                break;
        }

        String activationSpecClassName = null;
        if (msgListener != null) {
            activationSpecClassName = msgListener.getActivationSpecClass();
        }

   
        if (activationSpecClassName != null) {
            if (logger.isLoggable(Level.FINEST)) {
                String msg =
                    "ActivationSpecClassName = " + activationSpecClassName;
                logger.log(Level.FINEST, msg);
            }
           
            try {
                ClassLoader cl = rar.getClassLoader();
                Class aClass = cl.loadClass(activationSpecClassName);
               
                if (logger.isLoggable(Level.FINEST)) {
                    logger.log(Level.FINEST, "classloader = "
                            + aClass.getClassLoader());
                    logger.log(Level.FINEST, "classloader parent = "
                            + aClass.getClassLoader().getParent());
                }

                ActivationSpec activationSpec =
                    (ActivationSpec) aClass.newInstance();
                Set props = RARUtils.getMergedActivationConfigProperties(getDescriptor());

                AccessController.doPrivileged
                    (new SetMethodAction(activationSpec, props));
                   
                activationSpec.setResourceAdapter(ra);
                //GF issue -3462 DIRECT mode MDB does not connect to remote broker when addresslist is overridden
                //Need to set properties after the setResourceAdapter method is called
                 AccessController.doPrivileged
                    (new SetMethodAction(activationSpec, props));

                /*
                  AccessController.doPrivileged(new PrivilegedAction() {
                  public java.lang.Object run() {
                  activationSpec.setResourceAdapter(ra);
                  return null;
                  }
                  });
                */
               
                boolean validate =
                    "true".equals(System.getProperty("validate.jms.ra"));
                if (validate) {
                    try {
                        activationSpec.validate();
                    } catch (Exception ex) {
                        logger.log(Level.SEVERE,
                                "endpointfactory.as_validate_Failed", ex);
                    }
                }
               
                myState=BLOCKED;
                ra.endpointActivation(this, activationSpec);
           
                rar.addEndpointFactoryInfo(beanID_,
                        new MessageEndpointFactoryInfo(this, activationSpec));
     
               
            } catch (Exception ex) {
   
View Full Code Here

       
        ActiveResourceAdapter activeRar =
            registry_.getActiveResourceAdapter(resourceAdapterMid);

        if (activeRar instanceof ActiveInboundResourceAdapter) { //in case the RA is already undeployed
            ActiveInboundResourceAdapter rar =
         (ActiveInboundResourceAdapter) activeRar;
            MessageEndpointFactoryInfo info =
                rar.getEndpointFactoryInfo(beanID_);
           
      if (info != null) {
                rar.getResourceAdapter().endpointDeactivation(
                    info.getEndpointFactory(), info.getActivationSpec());
           
                rar.removeEndpointFactoryInfo(beanID_);
      } else {
          logger.log(Level.FINE,"Not de-activating the end point, since it is not activated");
      }
        }
    }
View Full Code Here

                            getInstance().getAllActiveResourceAdapters();
                if ( allRAs == null ) {
                    return null;
                }

                ActiveInboundResourceAdapter inboundRA = null;
                for (int i = 0; i < allRAs.length; i++ ) {
                    if ( allRAs[i] != null
                                    && allRAs[i] instanceof ActiveInboundResourceAdapter) {
                        try{
                            inboundRA = (ActiveInboundResourceAdapter)allRAs[i];
                            String moduleName  = inboundRA.getModuleName();
                           
                            //@todo :: after MBeans are modified
                            //Dont register system RARs as of now until MBean changes are complete.
                            if (ResourcesUtil.createInstance().belongToSystemRar(moduleName)) {
                                if (!ConnectorAdminServiceUtils.isJMSRA(moduleName)) {
View Full Code Here

                            getInstance().getAllActiveResourceAdapters();
                if ( allRAs == null ) {
                    return null;
                }
               
                ActiveInboundResourceAdapter inboundRA = null;

                for (int i = 0; i < allRAs.length; i++ ) {
                        if ( allRAs[i] != null
                                        && allRAs[i] instanceof ActiveInboundResourceAdapter) {
                            try{
                               
                                inboundRA = (ActiveInboundResourceAdapter)allRAs[i];
                                ConnectorWorkMgmtStatsImpl workstatsimpl =
                                    new ConnectorWorkMgmtStatsImpl(inboundRA);
                                String moduleName  = inboundRA.getModuleName();

                                //@todo :: after MBeans are modified
                                //Dont register system RARs as of now until MBean changes are complete.
                                if (ResourcesUtil.createInstance().belongToSystemRar(moduleName)) {
                                    if (!ConnectorAdminServiceUtils.isJMSRA(moduleName)) {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.connectors.ActiveInboundResourceAdapter

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.