<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Unfinished deployment in JBoss 7.1.1 on linux
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/zlazarev256">Zeev Lazarev</a> in <i>JBoss AS Development Deployment Framework</i> - <a href="https://community.jboss.org/message/776731#776731">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>After some porting changes from JBoss 5.1.0 to JBoss 7.1.1 our application worked fine on Windows 7 platform.</p><p>When trying to deploy this application on linux machine (both Ubuntu and RedHat, were tried) I encounter an issue</p><p>by which deployment enters idle state.</p><p>After investigating the issue I realized that a servlet in its init() method is awaiting for the proxy component that</p><p>represents my EJB stateless session bean. The code snippets below leads to the 'gate' flag for that component</p><p>that on Windows 7 is 'ture' and on linux machine is 'false':</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># componentName                    | CAAdminSessionBean</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># componentClass          | class org.ejbca.core.ejb.ca.caadmin.CAAdminSessionBean</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.as.ejb3.component.stateless.StatelessSessionComponent(org.jboss.as.ee.component.BasicComponent)</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    protected BasicComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct, InterceptorFactoryContext context) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->      waitForComponentStart();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    ...</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    protected void waitForComponentStart() {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        if (!gate) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            // Block until successful start</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            synchronized (this) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                if (stopping.get()) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    throw MESSAGES.componentIsStopped();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                while (!gate) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    // TODO: check for failure condition</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    try {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->                      wait();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    } catch (InterruptedException e) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                        Thread.currentThread().interrupt();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                        throw MESSAGES.componentNotAvailable();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The stack of JBoss Interceptors is given in reverse order to track back the issue that starts in servlet:</p><p>The interesting thing is that the proxy for local interface is created (it is represented by View39),</p><p>but the bean itselft is not - this is indicated by gate = false flag.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">#</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.ejbca.core.ejb.ca.caadmin.CAAdminSessionLocal$$$View39</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># Proxy for view class: org.ejbca.core.ejb.ca.caadmin.CAAdminSessionLocal of EJB: CAAdminSessionBean</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># caAdminSession   | org.ejbca.core.ejb.ca.caadmin.CAAdminSessionLocal</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">#</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">#</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.ejbca.ui.web.admin.configuration.StartServiceServlet</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public void init(ServletConfig config) throws ServletException {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            . . .</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->                  caAdminSession.initializeAndUpgradeCAs(admin);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            . . .</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">          }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.as.ee.component.ProxyInvocationHandler</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final Interceptor interceptor = interceptors.get(method);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        if (interceptor == null) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            throw new NoSuchMethodError(method.toString());</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final InterceptorContext context = new InterceptorContext();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        // special location for original proxy</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.putPrivateData(Object.class, proxy);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.putPrivateData(Component.class, component);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.putPrivateData(ComponentView.class, componentView);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.setParameters(args);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.setMethod(method);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        // setup the public context data</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.setContextData(new HashMap());</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->     return interceptor.processInvocation(context);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.invocation.ChainedInterceptor</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public Object processInvocation(final InterceptorContext context) throws Exception {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final int oldNext = context.getNextInterceptorIndex();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final List<Interceptor> old = context.getInterceptors();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.setInterceptors(interceptors);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        try {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"> ->         return context.proceed();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        } finally {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            context.setInterceptors(old, oldNext);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.invocation.InterceptorContext</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public Object proceed() throws Exception {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final ListIterator<Interceptor> iterator = interceptorIterator;</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        if (iterator.hasNext()) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            Interceptor next = iterator.next();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            try {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->              return next.processInvocation(this);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            } finally {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                if (iterator.hasPrevious()) iterator.previous();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        } else {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            throw msg.cannotProceed();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.as.ee.component.TCCLInterceptor</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public Object processInvocation(final InterceptorContext context) throws Exception {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final ClassLoader oldTccl = SecurityActions.getContextClassLoader();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        try {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            SecurityActions.setContextClassLoader(classLoader);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->          return context.proceed();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        } finally {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            SecurityActions.setContextClassLoader(oldTccl);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.as.ejb3.tx.CMTTxInterceptor</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public Object processInvocation(InterceptorContext invocation) throws Exception {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final EJBComponent component = (EJBComponent) invocation.getPrivateData(Component.class);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final MethodIntf methodIntf = MethodIntfHelper.of(invocation);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final TransactionAttributeType attr = component.getTransactionAttributeType(methodIntf, invocation.getMethod());</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        final int timeoutInSeconds = component.getTransactionTimeout(methodIntf, invocation.getMethod());</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        switch (attr) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            case MANDATORY:</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                return mandatory(invocation, component);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            case NEVER:</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                return never(invocation, component);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            case NOT_SUPPORTED:</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                return notSupported(invocation, component);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            case REQUIRED:</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->              return required(invocation, component, timeoutInSeconds);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            case REQUIRES_NEW:</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                return requiresNew(invocation, component, timeoutInSeconds);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            case SUPPORTS:</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                return supports(invocation, component);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            default:</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                throw new IllegalStateException("Unexpected tx attribute " + attr + " on " + invocation);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public Object processInvocation(InterceptorContext context) throws Exception {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        PooledComponent<ComponentInstance> component = (PooledComponent<ComponentInstance>) getComponent(context, EJBComponent.class);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->      ComponentInstance instance = component.getPool().get();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        context.putPrivateData(ComponentInstance.class, instance);</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        boolean discarded = false;</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        try {</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># StrictMaxPool</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    public T get() {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    . . .</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        T bean = null;</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        try {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            // Pool is empty, create an instance</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->          bean = create();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        } finally {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    . . .</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        return bean;</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.as.ejb3.component.stateless.StatelessSessionComponent</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        StatelessObjectFactory<StatelessSessionComponentInstance> factory = new StatelessObjectFactory<StatelessSessionComponentInstance>() {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            @Override</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            public StatelessSessionComponentInstance create() {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->              return (StatelessSessionComponentInstance) createInstance();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            @Override</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            public void destroy(StatelessSessionComponentInstance obj) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                obj.destroy();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        };</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># componentName | CAAdminSessionBean</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># componentClass | class org.ejbca.core.ejb.ca.caadmin.CAAdminSessionBean</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"># org.jboss.as.ejb3.component.stateless.StatelessSessionComponent(org.jboss.as.ee.component.BasicComponent)</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    protected BasicComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct, InterceptorFactoryContext context) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->      waitForComponentStart();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">  ...</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    protected void waitForComponentStart() {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        if (!gate) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            // Block until successful start</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            synchronized (this) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                if (stopping.get()) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    throw MESSAGES.componentIsStopped();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                while (!gate) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    // TODO: check for failure condition</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    try {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">->                      wait();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    } catch (InterruptedException e) {</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                        Thread.currentThread().interrupt();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                        throw MESSAGES.componentNotAvailable();</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                    }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">                }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">            }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">        }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    }</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"><br/></span></p><p>The structure of the application ear file is 8 war modules, 2 ejb modules and the library jars under lib entry:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>adminweb.war</p><p>...</p><p>more 7 wars</p><p>...</p><p>ejbca-ejb.jar</p><p>ejbca-ws-ejb.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I tried following things:</p><p>1. Changed @Stateless(mappedName=__old_jndiName__ to</p><p>@Stateless(mappedName=java:global/ejbca/ejbca-ejb/CAAdminSessionBean!org.ejbca.ca.caadmin.CAAdminSessionRemote)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2. Added below entry to standalone.xml to explicitly tie war module with ejb.</p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #000000 !important;"><</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; color: #336699 !important;">ear-subdeployments-isolated</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #000000 !important;">>false</</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; color: #336699 !important;">ear-subdeployments-isolated</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #000000 !important;">></code></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>3.  Added jboss-deployment-structure.xml file to META-INF of ear file to explicitly tie war module with ejb.</p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #000000 !important;"><</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; color: #336699 !important;">jboss-deployment-structure</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #000000 !important;">></code></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml spaces" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important;">  </code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;"><</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; font-size: 1em !important; color: #336699 !important;">sub-deployment</code> <code class="xml color1" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #808080 !important;">name</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;">=</code><code class="xml string" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #003366 !important;">"adminweb.war"</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;">></code></span></p><p class="line number22 index21 alt1" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; background-color: #ffffff !important; margin: 0 !important; padding: 0 1em 0 0 !important;"><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml spaces" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important;">    </code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;"><</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; font-size: 1em !important; color: #336699 !important;">dependencies</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;">></code></span></p><p class="line number25 index24 alt2" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; background-color: #ffffff !important; margin: 0 !important; padding: 0 1em 0 0 !important;"><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml spaces" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important;">      </code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;"><</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; font-size: 1em !important; color: #336699 !important;">module</code> <code class="xml color1" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #808080 !important;">name</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;">=</code><code class="xml string" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #003366 !important;">"deployment.ejbca.ear.ejbca-ejb.jar"</code> <code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;">/></code></span></p><p class="line number27 index26 alt2" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; background-color: #ffffff !important; margin: 0 !important; padding: 0 1em 0 0 !important;"><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml spaces" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important;">    </code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;"></</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; font-size: 1em !important; color: #336699 !important;">dependencies</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;">></code></span></p><p class="line number28 index27 alt1" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; background-color: #ffffff !important; margin: 0 !important; padding: 0 1em 0 0 !important;"><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml spaces" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important;">  </code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;"></</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; font-size: 1em !important; color: #336699 !important;">sub-deployment</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; color: #000000 !important;">></code></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #000000 !important;"></</code><code class="xml keyword" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; color: #336699 !important;">jboss-deployment-structure</code><code class="xml plain" style="margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #000000 !important;">></code></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The latter led to unnecessary dependencies errors in the logs.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Please advise.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks.</p><p>Zeev</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/776731#776731">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS Development Deployment Framework at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2072">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>