Autch! I looked a bit closer to the EJB3 MDB code and found out, that we will 
probably have no chance changing the JMS implementation used. 

The code is totally dependent on JBossMQ. For example method  
MDB.createDestination() (line 621 ff) looks like this:


  |    /**
  |     * Create and or lookup a JMS destination.
  |     *
  |     * @param type       Either javax.jms.Queue or javax.jms.Topic.
  |     * @param ctx        The naming context to lookup destinations from.
  |     * @param jndiName   The name to use when looking up destinations.
  |     * @param jndiSuffix The name to use when creating destinations.
  |     * @return The destination.
  |     * @throws IllegalArgumentException Type is not Queue or Topic.
  |     * @throws Exception                Description of Exception
  |     */
  |    protected Destination createDestination(final Class type,
  |                                            final Context ctx,
  |                                            final String jndiName,
  |                                            final String jndiSuffix)
  |            throws Exception
  |    {
  |       try
  |       {
  |          // first try to look it up
  |          return (Destination) ctx.lookup(jndiName);
  |       }
  |       catch (NamingException e)
  |       {
  |          // is JMS?
  |          if (getDestination() == null)
  |          {
  |             return null;
  |          }
  |          else
  |          {
  |             // if the lookup failes, the try to create it
  |             log.warn("destination not found: " + jndiName + " reason: " + 
e);
  |             log.warn("creating a new temporary destination: " + jndiName);
  | 
  |             //
  |             // jason: we should do away with this...
  |             //
  |             // attempt to create the destination (note, this is very
  |             // very, very unportable).
  |             //
  | 
  |             MBeanServer server = 
org.jboss.mx.util.MBeanServerLocator.locateJBoss();
  | 
  |             String methodName;
  |             if (type == Topic.class)
  |             {
  |                methodName = "createTopic";
  |             }
  |             else if (type == Queue.class)
  |             {
  |                methodName = "createQueue";
  |             }
  |             else
  |             {
  |                // type was not a Topic or Queue, bad user
  |                throw new IllegalArgumentException
  |                        ("Expected javax.jms.Queue or javax.jms.Topic: " + 
type);
  |             }
  | 
  |             // invoke the server to create the destination
  |             server.invoke(new 
ObjectName("jboss.mq:service=DestinationManager"),
  |                     methodName,
  |                     new Object[]{jndiSuffix},
  |                     new String[]{"java.lang.String"});
  | 
  |             // try to look it up again
  |             return (Destination) ctx.lookup(jndiName);
  |          }
  |       }
  |    }
  | 

So what we have here are direct references to JBossMQ 
(org.jboss.mx.util.MBeanServerLocator) and hardcoded JMX lookups that are (as 
far as I think) not mandatory (jboss.mq:service=DestinationManager).

Did I miss something in the documentation that says that EJB3 only works with 
JBossMQ?

Any feedback appreciated.
Greetings and thanks,

Patrick

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

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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to