More info:
     I think the problem may be because my webapp is not getting bound to the 
'java:' namespace because using the dumpContextList method someone posted in 
this forum I'm able to look at what the context contains.

    Making successive calls of
System.out.println("Dumping context list for 'java:'");
  | dumpContextList(ctxt, "java:");
  | System.out.println("Dumping context list for ''");
  | dumpContextList(ctxt, "");

results in 
Dumping context list for 'java:'
  | Dumping context list for ''
  | 1. TopicConnectionFactory: org.jboss.naming.LinkRefPair
  | 2. UIL2ConnectionFactory: javax.naming.LinkRef
  | 3. UserTransactionSessionFactory: $Proxy12
  | 4. UIL2XAConnectionFactory: javax.naming.LinkRef
  | 5. QueueConnectionFactory: org.jboss.naming.LinkRefPair
  | 6. UserTransaction: org.jboss.tm.usertx.client.ClientUserTransaction
  | 7. jmx: org.jnp.interfaces.NamingContext
  | 8. UILXAConnectionFactory: javax.naming.LinkRef
  | 9. UILConnectionFactory: javax.naming.LinkRef

but from my other webapp i'm getting this for the same piece of code
Dumping context list for 'java:'
1. SecurityProxyFactory: org.jboss.security.SubjectSecurityProxyFactory
  | 2. MyDS: org.jboss.resource.adapter.jdbc.WrapperDataSource
  | 3. DefaultJMSProvider: org.jboss.jms.jndi.JNDIProviderAdapter
  | 4. comp: javax.naming.Context
  | 5. JmsXA: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl
  | 6. jaas: javax.naming.Context
  | 7. timedCacheFactory: javax.naming.Context
  | 8. TransactionPropagationContextExporter: 
org.jboss.tm.TransactionPropagationContextFactory
  | 9. StdJMSPool: org.jboss.jms.asf.StdServerSessionPoolFactory
  | 10. TransactionPropagationContextImporter: 
org.jboss.tm.TransactionPropagationContextImporter
  | 11. TransactionManager: org.jboss.tm.TxManager
  | Dumping context list for ''
  | 1. TopicConnectionFactory: org.jboss.naming.LinkRefPair
  | 2. UIL2ConnectionFactory: javax.naming.LinkRef
  | 3. UserTransactionSessionFactory: $Proxy12
  | 4. UIL2XAConnectionFactory: javax.naming.LinkRef
  | 5. QueueConnectionFactory: org.jboss.naming.LinkRefPair
  | 6. UserTransaction: org.jboss.tm.usertx.client.ClientUserTransaction
  | 7. jmx: org.jnp.interfaces.NamingContext
  | 8. UILXAConnectionFactory: javax.naming.LinkRef
  | 9. UILConnectionFactory: javax.naming.LinkRef

How do i solve this?

private static void dumpContextList(InitialContext ctx, String prefix) {
  |     try {
  |             int i = 1;
  |             for( Enumeration e = ctx.list( prefix ); e.hasMoreElements(); ) 
{
  |                     Object o = e.nextElement();
  |                     if ( o instanceof NameClassPair ) {
  |                             System.out.println(i + ". " + o);
  |                     } else {
  |                             System.out.println(i + ". Found object of Class 
" + o.getClass().getName() + " = \"" + o.toString() + "\"" );
  |                     }
  |                     i++;
  |             }
  |     } catch (NamingException e) {
  |             e.printStackTrace();
  |     }
  | }



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968048#3968048

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968048
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to