I'm trying to send a message to a Joram topic and cannot find specific documentation 
or examples anywhere.  So far I've got:

in jboss-service.xml:

   <!-- Bind the Joram JNDI server -->
  |    <mbean code="org.jboss.naming.ExternalContext" 
name="jboss.jndi:service=ExternalContext,jndiName=external/joram/fileMaint">
  |       <attribute name="JndiName">external/joram/fileMaint</attribute>
  |       <attribute name="CacheContext">true</attribute>
  |       <attribute name="Properties">joram.properties</attribute>
  |       <attribute name="InitialContext">
  |          javax.naming.InitialContext
  |       </attribute>
  |       <attribute name="RemoteAccess">true</attribute>
  |    </mbean>
  | 

in joram.properties
java.naming.factory.initial=fr.dyade.aaa.jndi2.client.NamingContextFactory
  | java.naming.provider.url=joram://localhost:16400

Here's the code snippet I'm using
   private InitialContext jbosscontext = null; 
  |    private Context joramcontext = null;
  |    private Connection conn = null;
  | 
  |    public String send() throws Exception
  |    {
  |      System.out.println();
  |      System.out.println("Sends messages from JBoss to Joram...");
  |      
  |      jbosscontext = new InitialContext();
  |      Object tmp = jbosscontext.lookup("external/joram/fileMaint");
  |      joramcontext = (Context)tmp;
  |      
  |      TcpConnectionFactory cf = (TcpConnectionFactory) joramcontext.lookup("cf");
  | 

I know the context exists and is bound because I can access from outside JBoss.  I'm 
receiving this exception when it tries to retrieve the connection factory context:

Cause: javax.naming.NameNotFoundException: cf not bound
  |     at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:303)
  |     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
  |     at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:234)
  | 

Can anyone spot my problem or point me in the right direction?

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849174


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to