use of com.canoo.platform.server.javaee.ClientScoped in project dolphin-platform by canoo.
the class CdiBeanFactory method createDolphinSession.
@Produces
@ClientScoped
public ClientSession createDolphinSession() {
final ClientSessionProvider provider = PlatformBootstrap.getServerCoreComponents().getInstance(ClientSessionProvider.class);
Assert.requireNonNull(provider, "provider");
return provider.getCurrentClientSession();
}
use of com.canoo.platform.server.javaee.ClientScoped in project dolphin-platform by canoo.
the class RemotingCdiBeanFactory method createRemotingContext.
@Produces
@ClientScoped
public RemotingContext createRemotingContext(RemotingEventBus eventBus) {
Assert.requireNonNull(eventBus, "eventBus");
final DolphinContextProvider contextProvider = PlatformBootstrap.getServerCoreComponents().getInstance(DolphinContextProvider.class);
Assert.requireNonNull(contextProvider, "contextProvider");
final DolphinContext context = contextProvider.getCurrentDolphinContext();
Assert.requireNonNull(context, "context");
return new RemotingContextImpl(context, eventBus);
}
Aggregations