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

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


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

        AvailabilityService as = server.getConfig().getAvailabilityService();

        JmsService jmsService = server.getConfig().getExtensionByType(JmsService.class);


        //if (jmsService.getUseMasterBroker() != null && ! Boolean.parseBoolean(jmsService.getUseMasterBroker()))
          //  return true;
  if (as != null){
View Full Code Here


    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

        postRAConfiguration();
    }

    @Override
    public void destroy() {
        JmsService jmsService = getJmsService();
        if (connectorRuntime.isServer() && grizzlyListenerInit && jmsService != null
                && EMBEDDED.equalsIgnoreCase(jmsService.getType())) {
            GrizzlyService grizzlyService = Globals.get(GrizzlyService.class);
            if (grizzlyService != null)
                grizzlyService.removeNetworkProxy(JMS_SERVICE);
            grizzlyListenerInit = false;
        }
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

     */
    private void setClusterRABeanProperties() throws ConnectorRuntimeException {
        ConnectorDescriptor cd = super.getDescriptor();
        try {
            if (isClustered()) {
                JmsService jmsService = (JmsService)Globals.get(JmsService.class);
               /* ConfigContext ctx = ApplicationServer.getServerContext().
                    getConfigContext();
            JmsService jmsService = ServerBeansFactory.
                getConfigBean(ctx).getJmsService();    */
                String val = getGroupName();
                ConnectorConfigProperty  envProp = new ConnectorConfigProperty
                    (GROUPNAME, val, "Group Name", "java.lang.String");
                setProperty(cd, envProp);
                logFine("CLUSTERED instance - setting groupname as" + val);

        boolean inClusteredContainer = false;
        if(jmsService.getType().equals(EMBEDDED) || jmsService.getType().equals(LOCAL))
          inClusteredContainer = true;

            ConnectorConfigProperty  envProp1 = new ConnectorConfigProperty
              (CLUSTERCONTAINER, Boolean.toString(inClusteredContainer), "Cluster container flag",
                "java.lang.Boolean");
            setProperty(cd, envProp1);
            logFine("CLUSTERED instance - setting inclusteredcontainer as" + inClusteredContainer);
           if (jmsService.getType().equals(REMOTE)) {

            /*
                * Do not set master broker for remote broker.
                * The RA might ignore it if we set, but we have to
                        * be certain from our end.
View Full Code Here

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

        AvailabilityService as = server.getConfig().getAvailabilityService();

        JmsService jmsService = server.getConfig().getExtensionByType(JmsService.class);


        //if (jmsService.getUseMasterBroker() != null && ! Boolean.parseBoolean(jmsService.getUseMasterBroker()))
          //  return true;
  if (as != null){
View Full Code Here

    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

    @Inject
    private ActiveJmsResourceAdapter activeJmsResourceAdapter;

    public void postConstruct()
    {
       final JmsService jmsService = config.getExtensionByType(JmsService.class);
       activeJmsResourceAdapter.initializeLazyListener(jmsService);
       if (eagerStartupRequired())
       {
        try {
                initializeBroker();
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

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.