[jboss-user] [IronJacamar] - Re: Accessing JNDI in a Session bean ckient
Ri Ma
do-not-reply at jboss.com
Tue Sep 4 10:00:12 EDT 2012
Ri Ma [https://community.jboss.org/people/bangau] created the discussion
"Re: Accessing JNDI in a Session bean ckient"
To view the discussion, visit: https://community.jboss.org/message/757806#757806
--------------------------------------------------------------
I am sorry the listing is terrible
| | <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"> |
| | <resource-adapters> |
| | <resource-adapter> |
| | <archive>ims1211.rar</archive> |
| | <transaction-support>XATransaction</transaction-support> |
| | <config-property name="Port">19000</config-property> |
| | <config-property name="Server">localhost</config-property> |
| | <connection-definitions> |
| | <connection-definition class-name="com.ibm.connector2.ims.ico.IMSConnectionnFactory" |
| | | | | | | | jndi-name="java:/eis/IMSConnectionFactory" enabled="true" use-java-context="true" pool-name="java:/eis/IMSConnectionFactory"> |
| | <config-property name="Name">IMS Connection</config-property> |
| | <xa-pool> |
| | <min-pool-size>10</min-pool-size> |
| | <max-pool-size>100</max-pool-size> |
| | </xa-pool> |
| | <security> |
| | <application/> |
| | </security> |
| | </connection-definition> |
| | </connection-definitions> |
| | <admin-objects> |
| | <admin-object class-name="com.ibm.connector2.ims.ico.IMSConnectionnFactory" jndi-name="java:/eis/AcmeAdminObject" pool-name="AcmeAdminObject"> |
| | <config-property name="Threshold"> |
| | 10 |
| | </config-property> |
| | </admin-object> |
| | </admin-objects> |
| | </resource-adapter> |
| | </resource-adapters> |
| | </subsystem> |
Here is source code
| | | InitialContext ctx = null; |
| | | Properties env = new Properties(); |
| | | IMSConnection c = null; |
| | | IMSConnectionFactory cf= null; |
| | | |
| | | | try { |
| | | | | ctx = new InitialContext(env); |
| | | | | cf = (IMSConnectionFactory)ctx.lookup("eis/IMSConnectionFactory"); |
| | | | | c | = (IMSConnection)cf.getConnection(); | | | | |
| | | | }catch(NamingException e) { |
| | | | | e. |
| | | | }catch(Exception e){ |
| | | | | e.print |
| | | | } |
Here is my stactrace
15:42:35,343 INFO [stdout] (EJB default - 1) Error javax.naming.NameNotFoundException: eis/IMSConnectionFactory -- service jboss.naming.context.java.eis.IMSConnectionFactory
15:42:35,343 ERROR [stderr] (EJB default - 1) javax.naming.NameNotFoundException: eis/IMSConnectionFactory -- service jboss.naming.context.java.eis.IMSConnectionFactory
15:42:35,343 ERROR [stderr] (EJB default - 1) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
15:42:35,343 ERROR [stderr] (EJB default - 1) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)
15:42:35,343 ERROR [stderr] (EJB default - 1) at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113)
15:42:35,343 ERROR [stderr] (EJB default - 1) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)
15:42:35,343 ERROR [stderr] (EJB default - 1) at javax.naming.InitialContext.lookup(Unknown Source)
15:42:35,343 ERROR [stderr] (EJB default - 1) at de.bundeswehr.wewis.bussineslogic.JCAClient.getJCA(JCAClient.java:64)
15:42:35,343 ERROR [stderr] (EJB default - 1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:42:35,343 ERROR [stderr] (EJB default - 1) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
15:42:35,343 ERROR [stderr] (EJB default - 1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
15:42:35,343 ERROR [stderr] (EJB default - 1) at java.lang.reflect.Method.invoke(Unknown Source)
15:42:35,343 ERROR [stderr] (EJB default - 1) at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)
15:42:35,343 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
15:42:35,359 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,360 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228)
15:42:35,360 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)
15:42:35,360 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)
15:42:35,360 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,360 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropogatingInterceptor.processInvocation(EJBRemoteTransactionPropogatingInterceptor.java:80)
15:42:35,376 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:300)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$200(MethodInvocationMessageHandler.java:64)
15:42:35,392 ERROR [stderr] (EJB default - 1) at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:194)
15:42:35,392 ERROR [stderr] (EJB default - 1) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
15:42:35,392 ERROR [stderr] (EJB default - 1) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
15:42:35,392 ERROR [stderr] (EJB default - 1) at java.util.concurrent.FutureTask.run(Unknown Source)
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)
15:42:35,408 ERROR [stderr] (EJB default - 1) at java.lang.Thread.run(Unknown Source)
15:42:35,408 ERROR [stderr] (EJB default - 1) at org.jboss.threads.JBossThread.run(JBossThread.java:122)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/757806#757806]
Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120904/c551975d/attachment-0001.html
More information about the jboss-user
mailing list