<!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;">
Re: Accessing JNDI in a Session bean ckient
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/bangau">Ri Ma</a> in <i>IronJacamar</i> - <a href="https://community.jboss.org/message/757806#757806">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I am sorry the listing is terrible</p><table><tbody><tr><td style=";">    </td><td style=";"><subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"></td></tr><tr><td style=";">        </td><td style=";"><resource-adapters></td></tr><tr><td style=";">            </td><td style=";"><resource-adapter></td></tr><tr><td style=";">                </td><td style=";"><archive>ims1211.rar</archive></td></tr><tr><td style=";">                </td><td style=";"><transaction-support>XATransaction</transaction-support></td></tr><tr><td style=";">                </td><td style=";"><config-property name="Port">19000</config-property></td></tr><tr><td style=";">                </td><td style=";"><config-property name="Server">localhost</config-property></td></tr><tr><td style=";">                </td><td style=";"><connection-definitions></td></tr><tr><td style=";">                    </td><td style=";"><connection-definition class-name="com.ibm.connector2.ims.ico.IMSConnectionnFactory" </td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">jndi-name="java:/eis/IMSConnectionFactory" enabled="true" use-java-context="true" pool-name="java:/eis/IMSConnectionFactory"></td></tr><tr><td style=";">                        </td><td style=";"><config-property name="Name">IMS Connection</config-property></td></tr><tr><td style=";">                        </td><td style=";"><xa-pool></td></tr><tr><td style=";">                            </td><td style=";"><min-pool-size>10</min-pool-size></td></tr><tr><td style=";">                            </td><td style=";"><max-pool-size>100</max-pool-size></td></tr><tr><td style=";">                        </td><td style=";"></xa-pool></td></tr><tr><td style=";">                        </td><td style=";"><security></td></tr><tr><td style=";">                            </td><td style=";"><application/></td></tr><tr><td style=";">                        </td><td style=";"></security></td></tr><tr><td style=";">                    </td><td style=";"></connection-definition></td></tr><tr><td style=";">                </td><td style=";"></connection-definitions></td></tr><tr><td style=";">                </td><td style=";"><admin-objects></td></tr><tr><td style=";">                    </td><td style=";"><admin-object class-name="com.ibm.connector2.ims.ico.IMSConnectionnFactory" jndi-name="java:/eis/AcmeAdminObject" pool-name="AcmeAdminObject"></td></tr><tr><td style=";">                        </td><td style=";"><config-property name="Threshold"></td></tr><tr><td style=";">                            </td><td style=";">10</td></tr><tr><td style=";">                        </td><td style=";"></config-property></td></tr><tr><td style=";">                    </td><td style=";"></admin-object></td></tr><tr><td style=";">                </td><td style=";"></admin-objects></td></tr><tr><td style=";">            </td><td style=";"></resource-adapter></td></tr><tr><td style=";">        </td><td style=";"></resource-adapters></td></tr><tr><td style=";">    </td><td style=";"></subsystem></td></tr></tbody></table><p> Here is source code</p><table><tbody><tr><td style=";"></td><td style=";"></td><td style=";">   InitialContext ctx = null;</td></tr><tr><td style=";"></td><td style=";"></td><td style=";">   Properties env = new Properties();</td></tr><tr><td style=";"></td><td style=";"></td><td style=";">   IMSConnection c = null;</td></tr><tr><td style=";"></td><td style=";"></td><td style=";">   IMSConnectionFactory  cf= null;</td></tr><tr><td style=";"></td><td style=";"></td><td style=";">   </td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">try {</td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">ctx = new InitialContext(env);</td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">  cf   = (IMSConnectionFactory)ctx.lookup("eis/IMSConnectionFactory");</td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">  c</td><td style=";">= (IMSConnection)cf.getConnection();</td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td></tr><tr><td style=";"></td><td style=";"></td><td style=";">     </td><td style=";">}catch(NamingException e) {</td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">e.</td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">}catch(Exception e){</td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">e.print</td></tr><tr><td style=";"></td><td style=";"></td><td style=";"></td><td style=";">}</td></tr></tbody></table><p> Here is my stactrace</p><p>15:42:35,343 INFO  [stdout] (EJB default - 1)  Error javax.naming.NameNotFoundException: eis/IMSConnectionFactory -- service jboss.naming.context.java.eis.IMSConnectionFactory</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1) javax.naming.NameNotFoundException: eis/IMSConnectionFactory -- service jboss.naming.context.java.eis.IMSConnectionFactory</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at javax.naming.InitialContext.lookup(Unknown Source)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at de.bundeswehr.wewis.bussineslogic.JCAClient.getJCA(JCAClient.java:64)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at java.lang.reflect.Method.invoke(Unknown Source)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)</p><p>15:42:35,343 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)</p><p>15:42:35,359 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,360 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228)</p><p>15:42:35,360 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)</p><p>15:42:35,360 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)</p><p>15:42:35,360 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,360 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropogatingInterceptor.processInvocation(EJBRemoteTransactionPropogatingInterceptor.java:80)</p><p>15:42:35,376 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:300)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$200(MethodInvocationMessageHandler.java:64)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:194)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at java.util.concurrent.FutureTask.run(Unknown Source)</p><p>15:42:35,392 ERROR [stderr] (EJB default - 1)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)15:42:35,408 ERROR [stderr] (EJB default - 1)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</p><p>15:42:35,408 ERROR [stderr] (EJB default - 1)     at java.lang.Thread.run(Unknown Source)</p><p>15:42:35,408 ERROR [stderr] (EJB default - 1)     at org.jboss.threads.JBossThread.run(JBossThread.java:122)</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/757806#757806">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in IronJacamar at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>