Package com.sun.enterprise.connectors.jms.config

Examples of com.sun.enterprise.connectors.jms.config.JmsService


    private void setAddressList() throws ConnectorRuntimeException {
        //@Siva: Enhance setting AddressList. [Ignore this machines jms-host while
        //constructing addresslist]
        try {
            //ConfigContext ctx = ApplicationServer.getServerContext().getConfigContext();
            JmsService jmsService = (JmsService)Globals.get(JmsService.class);
            //ServerBeansFactory.getJmsServiceBean(ctx);
            setConnectionURL(jmsService, urlList);
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here


    public String getMasterBroker(String clustername) {
    String masterbrk = null;
    //if (rep != null) {
        try {
        JmsHost mb = getMasterJmsHostInCluster(clustername);
        JmsService js = getJmsServiceForMasterBroker
                                 (clustername);
        MQUrl url = createUrl(mb, js);
        masterbrk = url.toString();
        if (logger.isLoggable(Level.FINE))
            logger.log(Level.FINE, "Master broker obtained is " + masterbrk);
View Full Code Here

           Check if a master broker has been configured by looking at jmsService.getMasterBroker
           If it is configured, return th
           If not, use the first configured server in the cluster list as the master broker
         */
         Config config = domain.getConfigNamed(cluster.getConfigRef());
         JmsService jmsService = config.getExtensionByType(JmsService.class);
         Server masterBrokerInstance = null;

         String masterBrokerInstanceName = jmsService.getMasterBroker();
         if (masterBrokerInstanceName != null){
             masterBrokerInstance = domain.getServerNamed(masterBrokerInstanceName);
         }
         else{
            Server[] buddies = getServersInCluster(cluster);
View Full Code Here

    /**
     * Default setup concatanates all JMSHosts in a JMSService to create the address list
     */
    private void defaultSetup() throws Exception {
        logFine("performing defaultsetup");
        JmsService jmsService = Globals.get(JmsService.class);
        List hosts = jmsService.getJmsHost();
        for (int i=0; i < hosts.size(); i++) {
            MQUrl url = createUrl((JmsHost)hosts.get(i));
            urlList.add(url);
        }
    }
View Full Code Here

     }*/
     private JmsHost getResolvedLocalJmsHostInServer(final Server server)  {
        Config config = getConfigForServer(server);
        if (config != null)
        {
            JmsService jmsService = config.getExtensionByType(JmsService.class);
            JmsHost jmsHost = null;
             if (JMSServiceType.LOCAL.toString().equals(jmsService.getType())  || JMSServiceType.EMBEDDED.toString().equals(jmsService.getType())) {
            jmsHost = getDefaultJmsHost(jmsService);
            }
            return ( jmsHost );

        }
View Full Code Here

    @Inject
    private ActiveJmsResourceAdapter activeJmsResourceAdapter;

    public void postConstruct()
    {
       final JmsService jmsService = config.getExtensionByType(JmsService.class);
       if (eagerStartupRequired())
       {
        try {
                initializeBroker();
               } catch (ConnectorRuntimeException e) {
View Full Code Here

            String loc = ConnectorsUtil.getSystemModuleLocation(module);
            ConnectorRuntime connectorRuntime = connectorRuntimeProvider.get();
            connectorRuntime.createActiveResourceAdapter(loc, module, null);
    }
    private boolean eagerStartupRequired(){
        JmsService jmsService = getJmsService();
        if(jmsService == null) return false;
        String integrationMode =jmsService.getType();
        List <JmsHost> jmsHostList = jmsService.getJmsHost();
        if (jmsHostList == null) return false;

        String defaultJmsHostName = jmsService.getDefaultJmsHost();
        JmsHost defaultJmsHost = null;
        for (JmsHost host : jmsHostList){
            if(defaultJmsHostName != null && defaultJmsHostName.equals(host.getName())) {
                    defaultJmsHost = host;
                break;
View Full Code Here

    }

    @Override
    public void destroy() {
        try {
            JmsService jmsService = getJmsService();
            if (connectorRuntime.isServer() && grizzlyListenerInit && jmsService != null
                    && EMBEDDED.equalsIgnoreCase(jmsService.getType())) {
                GrizzlyService grizzlyService = null;
                try {
                    grizzlyService = Globals.get(GrizzlyService.class);
                } catch (MultiException rle) {
                    // if GrizzlyService was shut down already, skip removing the proxy.
View Full Code Here

        if (this.moduleName_.equals(ConnectorRuntime.DEFAULT_JMS_ADAPTER)) {
            if (connectorRuntime.isServer()) {
                Domain domain = Globals.get(Domain.class);
                ServerContext serverContext = Globals.get(ServerContext.class);
                Server server = domain.getServerNamed(serverContext.getInstanceName());
                JmsService jmsService = server.getConfig().getExtensionByType(JmsService.class);
                initializeLazyListener(jmsService);
            }
    //System.setProperty("imq.jmsra.direct.clustered", "true");
                AccessController.doPrivileged
                        (new java.security.PrivilegedExceptionAction() {
View Full Code Here

        try {
          Domain domain = Globals.get(Domain.class);
          ServerContext serverContext = Globals.get(ServerContext.class);
          Server server = domain.getServerNamed(serverContext.getInstanceName());

          JmsService jmsService = server.getConfig().getExtensionByType(JmsService.class);
          if (jmsService.getType().equals(REMOTE)) {
            //If REMOTE, the broker cluster instances already have
            //been configured with the right properties.
            return;
          }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.connectors.jms.config.JmsService

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.