Search in sources :

Example 1 with PortAddressRegistryImpl

use of org.apache.openejb.core.webservices.PortAddressRegistryImpl in project tomee by apache.

the class WsService method start.

@Override
public void start() throws ServiceException {
    wsRegistry = SystemInstance.get().getComponent(WsRegistry.class);
    if (wsRegistry == null && SystemInstance.get().getComponent(HttpListenerRegistry.class) != null) {
        wsRegistry = new OpenEJBHttpWsRegistry();
    }
    if (portAddressRegistry == null) {
        portAddressRegistry = new PortAddressRegistryImpl();
        SystemInstance.get().setComponent(PortAddressRegistry.class, portAddressRegistry);
    }
    containerSystem = (CoreContainerSystem) SystemInstance.get().getComponent(ContainerSystem.class);
    portAddressRegistry = SystemInstance.get().getComponent(PortAddressRegistry.class);
    assembler = SystemInstance.get().getComponent(Assembler.class);
    SystemInstance.get().setComponent(WsService.class, this);
    if (assembler != null) {
        SystemInstance.get().addObserver(this);
        for (final AppInfo appInfo : assembler.getDeployedApplications()) {
            final AppContext appContext = containerSystem.getAppContext(appInfo.appId);
            deploy(new AssemblerAfterApplicationCreated(appInfo, appContext, null));
        }
    }
}
Also used : AppContext(org.apache.openejb.AppContext) PortAddressRegistryImpl(org.apache.openejb.core.webservices.PortAddressRegistryImpl) AssemblerAfterApplicationCreated(org.apache.openejb.assembler.classic.event.AssemblerAfterApplicationCreated) Assembler(org.apache.openejb.assembler.classic.Assembler) PortAddressRegistry(org.apache.openejb.core.webservices.PortAddressRegistry) WebAppInfo(org.apache.openejb.assembler.classic.WebAppInfo) AppInfo(org.apache.openejb.assembler.classic.AppInfo)

Aggregations

AppContext (org.apache.openejb.AppContext)1 AppInfo (org.apache.openejb.assembler.classic.AppInfo)1 Assembler (org.apache.openejb.assembler.classic.Assembler)1 WebAppInfo (org.apache.openejb.assembler.classic.WebAppInfo)1 AssemblerAfterApplicationCreated (org.apache.openejb.assembler.classic.event.AssemblerAfterApplicationCreated)1 PortAddressRegistry (org.apache.openejb.core.webservices.PortAddressRegistry)1 PortAddressRegistryImpl (org.apache.openejb.core.webservices.PortAddressRegistryImpl)1