public synchronized void start(StartContext context) throws StartException {
        // FIXME: kakonyii
        // if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
        // Set the MBeanServer
        final MBeanServer mbeanServer = this.mbeanServer.getOptionalValue();
        if (mbeanServer != null) {
            // Registry.getRegistry(null, null).setMBeanServer(mbeanServer);
        }
        // }

        System.setProperty("catalina.home", pathManagerInjector.getValue().getPathEntry(TEMP_DIR).resolvePath());
        // FIXME: kakonyii
        // server = new StandardServer();
        // final StandardService service = new StandardService();
        // service.setName(JBOSS_SIP);
        // service.setServer(server);
        // server.addService(service);

        // final Engine engine = new StandardEngine();
        // engine.setName(JBOSS_SIP);
        // engine.setService(service);
        // engine.setDefaultHost(defaultHost);
        // if (instanceId != null) {
        // engine.setJvmRoute(instanceId);
        // }

        // service.setContainer(engine);

        // if (useNative) {
        // final AprLifecycleListener apr = new AprLifecycleListener();
        // apr.setSSLEngine("on");
        // server.addLifecycleListener(apr);
        // }
        // server.addLifecycleListener(new JasperListener());

        sipService = new SipStandardService();
        // https://code.google.com/p/sipservlets/issues/detail?id=277
        // Add the Service and sip app dispatched right away so apps can get the needed objects
        // when they deploy fast
        // FIXME: kakonyii
        // server.addService(sipService);

        if (sipAppDispatcherClass != null) {
            sipService.setSipApplicationDispatcherClassName(sipAppDispatcherClass);
        } else {
            sipService.setSipApplicationDispatcherClassName(SipApplicationDispatcherImpl.class.getName());
        }
        //
        final String baseDir = System.getProperty("jboss.server.base.dir");
        if (sipAppRouterFile != null) {
            if (!sipAppRouterFile.startsWith(FILE_PREFIX_PATH)) {
                sipAppRouterFile = FILE_PREFIX_PATH.concat(baseDir).concat("/").concat(sipAppRouterFile);
            }
            System.setProperty("javax.servlet.sip.dar", sipAppRouterFile);
        }

        sipService.setSipPathName(sipPathName);

        if (sipStackPropertiesFile != null) {
            if (!sipStackPropertiesFile.startsWith(FILE_PREFIX_PATH)) {
                sipStackPropertiesFile = FILE_PREFIX_PATH.concat(baseDir).concat("/").concat(sipStackPropertiesFile);
            }
        }
        sipService.setSipStackPropertiesFile(sipStackPropertiesFile);
        //
        if (sipConcurrencyControlMode != null) {
            sipService.setConcurrencyControlMode(sipConcurrencyControlMode);
        } else {
            sipService.setConcurrencyControlMode("None");
        }

        sipService.setProxyTimerServiceImplementationType(proxyTimerServiceImplementationType);
        sipService.setSasTimerServiceImplementationType(sasTimerServiceImplementationType);
        sipService.setGatherStatistics(gatherStatistics);
        sipService.setCongestionControlCheckingInterval(sipCongestionControlInterval);

        sipService.setUsePrettyEncoding(usePrettyEncoding);

        sipService.setBaseTimerInterval(baseTimerInterval);
        sipService.setT2Interval(t2Interval);
        sipService.setT4Interval(t4Interval);
        sipService.setTimerDInterval(timerDInterval);
        if (additionalParameterableHeaders != null) {
            sipService.setAdditionalParameterableHeaders(additionalParameterableHeaders);
        }
        sipService.setDialogPendingRequestChecking(dialogPendingRequestChecking);
        sipService.setDnsServerLocatorClass(dnsServerLocatorClass);
        sipService.setDnsTimeout(dnsTimeout);
        sipService.setDnsResolverClass(dnsResolverClass);
        sipService.setCallIdMaxLength(callIdMaxLength);
        sipService.setTagHashMaxLength(tagHashMaxLength);
        sipService.setCanceledTimerTasksPurgePeriod(canceledTimerTasksPurgePeriod);
        sipService.setMemoryThreshold(memoryThreshold);
        sipService.setBackToNormalMemoryThreshold(backToNormalMemoryThreshold);
        sipService.setCongestionControlPolicy(congestionControlPolicy);
        sipService.setOutboundProxy(outboundProxy);
        sipService.setName(JBOSS_SIP);
        sipService.setGracefulInterval(gracefulInterval);

        // FIXME: kakonyii
        // sipService.setServer(server);
        // sipEngine = new SipStandardEngine();
        // sipEngine.setName(JBOSS_SIP);
        // sipEngine.setService(sipService);
        // sipEngine.setDefaultHost(defaultHost);
        if (instanceId != null) {
            // sipEngine.setJvmRoute(instanceId);
        }
        // sipService.setContainer(sipEngine);

        try {
            sipService.initialize();
            sipService.start();
            // FIXME: kakonyii
            // server.init();
            // server.start();
        } catch (Exception e) {
            throw new StartException(MESSAGES.errorStartingSip(), e);
        }
    }
public synchronized void start ( StartContext context ) throws StartException { final MBeanServer mbeanServer = this . mbeanServer . getOptionalValue ( ) ; if ( mbeanServer != null ) { } System . setProperty ( "catalina.home" , pathManagerInjector . getValue ( ) . getPathEntry ( TEMP_DIR ) . resolvePath ( ) ) ; sipService = new SipStandardService ( ) ; if ( sipAppDispatcherClass != null ) { sipService . setSipApplicationDispatcherClassName ( sipAppDispatcherClass ) ; } else { sipService . setSipApplicationDispatcherClassName ( SipApplicationDispatcherImpl . class . getName ( ) ) ; } final String baseDir = System . getProperty ( "jboss.server.base.dir" ) ; if ( sipAppRouterFile != null ) { if ( ! sipAppRouterFile . startsWith ( FILE_PREFIX_PATH ) ) { sipAppRouterFile = FILE_PREFIX_PATH . concat ( baseDir ) . concat ( "/" ) . concat ( sipAppRouterFile ) ; } System . setProperty ( "javax.servlet.sip.dar" , sipAppRouterFile ) ; } sipService . setSipPathName ( sipPathName ) ; if ( sipStackPropertiesFile != null ) { if ( ! sipStackPropertiesFile . startsWith ( FILE_PREFIX_PATH ) ) { sipStackPropertiesFile = FILE_PREFIX_PATH . concat ( baseDir ) . concat ( "/" ) . concat ( sipStackPropertiesFile ) ; } } sipService . setSipStackPropertiesFile ( sipStackPropertiesFile ) ; if ( sipConcurrencyControlMode != null ) { sipService . setConcurrencyControlMode ( sipConcurrencyControlMode ) ; } else { sipService . setConcurrencyControlMode ( "None" ) ; } sipService . setProxyTimerServiceImplementationType ( proxyTimerServiceImplementationType ) ; sipService . setSasTimerServiceImplementationType ( sasTimerServiceImplementationType ) ; sipService . setGatherStatistics ( gatherStatistics ) ; sipService . setCongestionControlCheckingInterval ( sipCongestionControlInterval ) ; sipService . setUsePrettyEncoding ( usePrettyEncoding ) ; sipService . setBaseTimerInterval ( baseTimerInterval ) ; sipService . setT2Interval ( t2Interval ) ; sipService . setT4Interval ( t4Interval ) ; sipService . setTimerDInterval ( timerDInterval ) ; if ( additionalParameterableHeaders != null ) { sipService . setAdditionalParameterableHeaders ( additionalParameterableHeaders ) ; } sipService . setDialogPendingRequestChecking ( dialogPendingRequestChecking ) ; sipService . setDnsServerLocatorClass ( dnsServerLocatorClass ) ; sipService . setDnsTimeout ( dnsTimeout ) ; sipService . setDnsResolverClass ( dnsResolverClass ) ; sipService . setCallIdMaxLength ( callIdMaxLength ) ; sipService . setTagHashMaxLength ( tagHashMaxLength ) ; sipService . setCanceledTimerTasksPurgePeriod ( canceledTimerTasksPurgePeriod ) ; sipService . setMemoryThreshold ( memoryThreshold ) ; sipService . setBackToNormalMemoryThreshold ( backToNormalMemoryThreshold ) ; sipService . setCongestionControlPolicy ( congestionControlPolicy ) ; sipService . setOutboundProxy ( outboundProxy ) ; sipService . setName ( JBOSS_SIP ) ; sipService . setGracefulInterval ( gracefulInterval ) ; if ( instanceId != null ) { } try { sipService . initialize ( ) ; sipService . start ( ) ; } catch ( Exception e ) { throw new StartException ( MESSAGES . errorStartingSip ( ) , e ) ; } }
{@inheritDoc}