Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFCORE-1239] Embedded API is confusing re: process types #1320

Merged
merged 1 commit into from Dec 21, 2015

Conversation

bstansberry
Copy link
Contributor

This PR is about cleaning up the use of the term 'server' in the embedded API in places where the relevant thing may be either a standalone server or a host controller.

I introduce a new factory class EmbeddedProcessFactory to replace the now deprecated EmbeddedServerFactory. I introduce a new EmbeddedManagedProcess interface as the super-interface for the existing StandaloneServer and HostController interfaces, thus unifying their APIs. I subclass ServerStartException with EmbeddedProcessStartException and then deprecate the superclass.

There were two minor breaking changes needed versus core 2.0.0:

  1. The HostController interface has an odd "public HostController getHostController()" method that logically would only return 'this'. I could keep this but it's not needed and I'd rather get rid of it now before someone external starts using it.

  2. The HostController interface's start() method does not throw a checked exception, while the equivalent start() on StandaloneServer does. To do anything coherent I need to unify the exception handling. HostController is extremely unlikely to be used outside wf core, while StandaloneServer is used, and removing a checked exception from StandaloneServer would be a breaking change or any user that catches it, so instead I will add the exception to HostController.start().

I think both of these are ok as I don't envision anyone other than the CLI using the HostController interface at this point.

@wildfly-ci
Copy link

Core - Full Integration Build 2458 outcome was FAILURE using a merge of 44dc591
Summary: Tests failed: 1 (1 new), passed: 3309, ignored: 191 Build time: 00:51:09

Failed tests

org.jboss.as.test.integration.ejb.stateful.passivation.PassivationTestCase.testPassivationMaxSize: javax.ejb.EJBException: java.lang.IllegalStateException: WFLYCLEJBINF0008: Stateful session bean UnknownSessionID [4965695352574850695253565268545756565268575469655555685451535253] refers to an invalid bean group 46150f34-3860-4e51-9323-482c52227a88
    at org.wildfly.clustering.ejb.infinispan.bean.InfinispanBeanFactory.createBean(InfinispanBeanFactory.java:80)
    at org.wildfly.clustering.ejb.infinispan.InfinispanBeanManager.findBean(InfinispanBeanManager.java:235)
    at org.jboss.as.ejb3.cache.distributable.DistributableCache.get(DistributableCache.java:117)
    at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:58)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:44)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:66)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
    at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
    at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:195)
    at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:259)
    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:184)
    at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocation(EJBObjectInterceptor.java:58)
    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
    at org.jboss.ejb.client.EJBHomeInterceptor.handleInvocation(EJBHomeInterceptor.java:83)
    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
    at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:42)
    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
    at org.jboss.as.test.integration.ejb.remote.client.api.interceptor.SimpleEJBClientInterceptor.handleInvocation(SimpleEJBClientInterceptor.java:48)
    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
    at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:125)
    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)


Introduce a new factory class EmbeddedProcessFactory to replace the now deprecated EmbeddedServerFactory.
Introduce a new EmbeddedManagedProcess interface as the super-interface for the existing StandaloneServer and HostController interfaces, thus unifying their APIs
Subclass ServerStartException with EmbeddedProcessStartException and then deprecate the superclass.
Move offline CLI to the above.
Misc minor cleanups.
n1hility added a commit that referenced this pull request Dec 21, 2015
[WFCORE-1239] Embedded API is confusing re: process types
@n1hility n1hility merged commit 3a884f2 into wildfly:master Dec 21, 2015
@bstansberry bstansberry deleted the embed-api branch December 23, 2015 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants