activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: ActiveMQ
Date Tue, 07 Oct 2008 14:28:06 GMT
On Tue, Oct 7, 2008 at 8:16 AM, NedaNima <nhearne@lycos.com> wrote:
>
> I downloaded apache-activemq-5.1.0 and expanded it on my local machine and am
> tryign to run one of the samples. I notied that
> geronimo-jms_1.1_spec-1.1.1.jar contains all of the jms library, Just wanted
> to know if there is any reason for this? I am trying to use one of the
> samples in my application that uses j2ee.jar (which incluces jms library)
> and objects don't seem to be compatible for instance Connection object (in
> geronimo-jms_1.1_spec-1.1.1.jar) doesn't have method createSession.
>
> Does anyone know why ActiveMQ has done this?

The geronimo-jms-1.1_spec JAR is included for licensing purposes. The
geronimo-jms-1.1_spec JAR is simply a version of the JMS spec APIs
that uses the Apache License instead of the license used with the Sun
J2EE JAR.

I just looked at the Connection object in the 1.1.1 version of the
geronimo-jms-1.1_spec JAR and the Connection.createSession() method is
there. See below my use of the javap utility to check for this method:

$ javap -classpath
~/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar
javax.jms.Connection
Compiled from "Connection.java"
public interface javax.jms.Connection{
    public abstract javax.jms.Session createSession(boolean, int)
 throws javax.jms.JMSException;
    public abstract java.lang.String getClientID()       throws
javax.jms.JMSException;
    public abstract void setClientID(java.lang.String)       throws
javax.jms.JMSException;
    public abstract javax.jms.ConnectionMetaData getMetaData()
throws javax.jms.JMSException;
    public abstract javax.jms.ExceptionListener getExceptionListener()
      throws javax.jms.JMSException;
    public abstract void
setExceptionListener(javax.jms.ExceptionListener)       throws
javax.jms.JMSException;
    public abstract void start()       throws javax.jms.JMSException;
    public abstract void stop()       throws javax.jms.JMSException;
    public abstract void close()       throws javax.jms.JMSException;
    public abstract javax.jms.ConnectionConsumer
createConnectionConsumer(javax.jms.Destination, java.lang.String,
javax.jms.ServerSessionPool, int)       throws javax.jms.JMSException;
    public abstract javax.jms.ConnectionConsumer
createDurableConnectionConsumer(javax.jms.Topic, java.lang.String,
java.lang.String, javax.jms.ServerSessionPool, int)       throws
javax.jms.JMSException;
}

Notice that the createSession() method is, in fact, there.

Although it shouldn't necessarily matter, but if you're using ActiveMQ
5.1, it uses the the 1.1 version of the geronimo-jms-1.1_spec JAR, not
the 1.1.1 version.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Mime
View raw message