Build problem
Hi: When I tried to complie the latest source code from incubator-activemq-4.0-SNAPSHOT, I get the following error Missing: -- 1) org.apache.geronimo.specs:geronimo-servlet_2.4_spec:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.geronimo.specs -DartifactId=geronimo-servlet_2.4_spec \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) incubator-activemq:activemq-core:jar:4.0-SNAPSHOT 2) org.apache.geronimo.specs:geronimo-j2ee-jacc_1.0_spec:jar:1.0 3) org.apache.geronimo.specs:geronimo-servlet_2.4_spec:jar:1.0-SNAPSHOT 2) org.apache.geronimo.specs:geronimo-ejb_2.1_spec:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.geronimo.specs -DartifactId=geronimo-ejb_2.1_spec \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) incubator-activemq:activemq-core:jar:4.0-SNAPSHOT 2) org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec:jar:1.0 3) org.apache.geronimo.specs:geronimo-ejb_2.1_spec:jar:1.0-SNAPSHOT -- 2 required artifacts are missing. for artifact: incubator-activemq:activemq-core:jar:4.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2), apache.snapshots (http://cvs.apache.org/maven-snapshot-repository), codehaus-snapshot (http://snapshots.maven.codehaus.org/maven2), apache-maven1-snapshot (http://cvs.apache.org/repository), maven-csharp (http://maven-csharp.javaforge.com/repo) I downloaded geronimo-spec-ejb-2.1-SNAPSHOT.jar and geronimo-spec-servlet-2.4-SNAPSHOT.jar from http://cvs.apache.org/repository/geronimo-spec/jars/ . I tried to install it with command: mvn install:install-file -DgroupId=org.apache.geronimo.specs -DartifactId=gerpnimo-ejb_2.1_spec -Dversion=2.1-SNAPSHOT -Dpackaging=jar -Dfile=/home/fanli/geronimo-spec-ejb-2.1-SNAPSHOT.jar And I get the following error: [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: incubator-activemq:activemq-core POM Location: /home/fanli/incubator-activemq-4.0-SNAPSHOT/activemq-core/pom.xml Validation Messages: [0] 'dependencies.dependency.version' is missing for incubator-activemq:activemq-jaas Reason: Failed to validate POM [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Failed to validate POM at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to validate POM at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:902) at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:738) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:414) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:190) at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:447) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:491) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351) ... 11 more [INFO] [INFO] Total time: 1 second [INFO] Finished at: Thu Apr 20 09:54:58 PDT 2006 [INFO] Final Memory: 1M/3M [INFO] I am not that familiar with maven, am I
RE: FW: InstanceAlreadyExistsException when creating Connections without start them
I am running only one broker and trying to make multiple connections to it. Thanks for commit the patch. Fan -Original Message- From: James Strachan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 8:55 AM To: activemq-dev@geronimo.apache.org Subject: Re: FW: InstanceAlreadyExistsException when creating Connections without start them On 4/6/06, Li, Fan [EMAIL PROTECTED] wrote: This problem stops to appear if I change the variable nextConnectionId from long to static long, since it now generate different names for each Connection it tries to register with the MBeanServer. Ah I see. I've committed your patch to SVN HEAD which should fix this issue. I wonder, is your issue caused by running multiple brokers - or is it multiple connectors clashing? No worries though, this issue shouldn't occur again -- James --- http://radio.weblogs.com/0112098/
InstanceAlreadyExistsException when creating Connections without start them
Hi: I am doing a test where I am creating a number of TopicConnections on different TCP port on my machine, in particular I am using the TransportConnector URIs: tcp://localhost:61616, tcp://localhost:61626, tcp://localhost:61636 and tcp://localhost:61646. I have started a BrokerService with these four TransportConnectors and I have created four TCP TopicConnections without starting any of them, as a result I am getting InstanceAlreadyExistsException from the registerMBean() method of ManagedTransportConnection class, with the stack trace similar to: 2006-04-05 18:35:53,474 [127.0.0.1:61616] WARN ActiveMQConnection - Async exception with no exception listener: java.net.SocketException: Connection reset java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:48) at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:55) at java.io.DataInputStream.readInt(DataInputStream.java:353) at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:270) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:135) at java.lang.Thread.run(Thread.java:595) 2006-04-05 18:35:53,477 [mazon.com:61616] ERROR TransportConnector - Could not accept connection: java.io.IOException: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1 java.io.IOException: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1 at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:36) at org.apache.activemq.broker.jmx.ManagedTransportConnection.registerMBean(ManagedTransportConnection.java:98) at org.apache.activemq.broker.jmx.ManagedTransportConnection.setConnectionId(ManagedTransportConnection.java:78) at org.apache.activemq.broker.jmx.ManagedTransportConnection.init(ManagedTransportConnection.java:57) at org.apache.activemq.broker.jmx.ManagedTransportConnector.createConnection(ManagedTransportConnector.java:60) at org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:135) at org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:137) at java.lang.Thread.run(Thread.java:595) Caused by: javax.management.InstanceAlreadyExistsException: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1 at com.sun.jmx.mbeanserver.RepositorySupport.addMBean(RepositorySupport.java:452) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1410) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:936) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:337) at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497) at org.apache.activemq.broker.jmx.ManagedTransportConnection.registerMBean(ManagedTransportConnection.java:95) ... 6 more Is it required in ActiveMQ to start a Connection right after its creation? It seems all instances of ManagedTransportConnector for a particular BrokerService share the same MBeanServer. When I run debugger on the registerMBean() method that throws the exception, the objects it tries to register with the MBeanServer appears to be different, but the name it tries to register them under seems to be the same org.apache.activemq:BrokerName=localhost,Connection=1,Type=Connection. Do anyone know what might be the cause of this? Thanks Fan
RE: PrefetchSubscription preLoadSize not decreased
Hi: After getting the new code, the problem is fixed. Thanks Fan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hiram Chirino Sent: Wednesday, March 22, 2006 10:18 AM To: activemq-dev@geronimo.apache.org Subject: Re: PrefetchSubscription preLoadSize not decreased Hi Li, As of svn revision 387562, we no longer use the preLoadSize. see: http://svn.apache.org/viewcvs?rev=387562view=rev Please get an update and let me know if this has fixed your issue. On 3/22/06, Li, Fan [EMAIL PROTECTED] wrote: Hi: I am running test on the JmsConnectors, the test case I am trying to run is sending and receiving Messages in the Queue region and the transport I am using is TcpTransport. I am running into a problem with the preLoadSize of PrefetchSubscription not being decremented at all, so Messages add to PrefetchSubscription can no longer be dispatched. The preLoadSize is decreased by calling the decrementPreloadSize of PrefetchSubscription, which is never called in my test case. I have setup a similar test but using VMTransport, there appears to be no problem. In both test cases, the dispatch method of PrefetchSubscription calls the dispatchAsync method of its associated AbstractConnection for dispatching. The differences between the two test cases I have notices is that when the transport is tcp, there is a taskRunner associated with the AbstactConnection, which will be wakeup to run the task at some future time; but when the transport is vm, the AbstractConnection has no taskRunner and the dispatchSync method will be called to dispatch the message as well as calling the run method on the Consumer of the message, which will correctly call the onDispatch method of PrefetchSubscription and decrease the preLoadSize. I have trouble tracing whether or not the task that eventually ran by the task associated with the taskRunner actually called the run method on the Consumer of the message, do anyone knows how to fix this problem? Thanks Fan -- Regards, Hiram
Should getNextId() of JmsConnector increase nextId?
Hi: I think this is a bug. The method getNextId() of JmsConnector.java returns nextId, but it does not increase it, so does it mean all JmsConnectors get the same id, therefore have the same name generated for them? Thanks Fan
Build Problem
I have been trying to build the latest source code with maven 1.0.2 and kept getting build failure. This is the build for the latest SNAPSHOT. I am not sure if anyone had similar problem. BUILD FAILED File.. /home/fanli/.maven/cache/maven-multiproject-plugin-1.3.1/plugin.jelly Element... maven:reactor Line.. 217 Column 9 Unable to obtain goal [test:test] -- /home/fanli/.maven/cache/maven-test-plugin- 1.6.2/plugin.jelly:181:54: fail There were test failures. Total time: 58 minutes 22 seconds Finished at: Thu Feb 16 09:49:19 PST 2006 Thanks Fan
RE: Question regard to org.activemq.network.jms package
Thanks Rob -Original Message- From: Rob Davies [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 08, 2006 10:27 AM To: activemq-dev@geronimo.apache.org Subject: Re: Question regard to org.activemq.network.jms package Hi Li, your requested changes are in SVN head cheers, Rob On 8 Feb 2006, at 17:31, Li, Fan wrote: Hi: I am wondering if it is possible to have a couple small changes made to the classes in the org.activemq.network.jms package. Right now the TopicBridge class has a protected JmsTopicConnector, which implements the method createReplyToTopicBridge. This means if I have another JmsConnector that needs to use TopicBridge; it has to inherit from JmsTopicConnector. And it is also a problem if my reply to bridge is not a TopicBridge. So I am wondering if it is okay to include a more general abstract method createReplyToBridge in the JmsConnector class and have all the subclasses to it implement this method, and make TopicBridge have a protected JmsConnector instead of JmsTopicConnector, so other subclass of JmsConnecor can also use TopicBridge. (The same goes for QueueBridge.) Thanks Fan Li -Original Message- From: Hiram Chirino [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 10:40 AM To: activemq-dev@geronimo.apache.org Subject: Re: Question regard to org.activemq.network.jms package Yes, And make sure that they use the Apache Copyright headers on them. Regards, Hiram On Feb 3, 2006, at 1:19 PM, Li, Fan wrote: Hi Hiram: What do I need to include in this patch? Just the source code for my classes? Thanks Fan Li -Original Message- From: Hiram Chirino [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 10:12 AM To: activemq-dev@geronimo.apache.org Subject: Re: Question regard to org.activemq.network.jms package Hi Fan, If you submit a patch, we would be glad to add them to the next release. Regards, Hiram On Feb 3, 2006, at 1:07 PM, Li, Fan wrote: Hi: I am currently working on a project that would create a bridge that enables the communication of applications written using our messaging system to those applications written using ActiveMQ. The ActiveMQ package org.activemq.network.jms provides most of the functionalities I needed in my project. However, I believe that ActiveMQ only provide foreign Topic to ActiveMQ Topic and foreign Queue to ActiveMQ Queue bridges, but my project has the need for Queue to Topic and Topic to Queue bridges. I am going to write my own classes for these, but I am wondering if ActiveMQ would provide these functionalities in the future. Thanks Fan Li
Question regard to org.activemq.network.jms package
Hi: I am currently working on a project that would create a bridge that enables the communication of applications written using our messaging system to those applications written using ActiveMQ. The ActiveMQ package org.activemq.network.jms provides most of the functionalities I needed in my project. However, I believe that ActiveMQ only provide foreign Topic to ActiveMQ Topic and foreign Queue to ActiveMQ Queue bridges, but my project has the need for Queue to Topic and Topic to Queue bridges. I am going to write my own classes for these, but I am wondering if ActiveMQ would provide these functionalities in the future. Thanks Fan Li
RE: Question regard to org.activemq.network.jms package
Hi Hiram: What do I need to include in this patch? Just the source code for my classes? Thanks Fan Li -Original Message- From: Hiram Chirino [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 10:12 AM To: activemq-dev@geronimo.apache.org Subject: Re: Question regard to org.activemq.network.jms package Hi Fan, If you submit a patch, we would be glad to add them to the next release. Regards, Hiram On Feb 3, 2006, at 1:07 PM, Li, Fan wrote: Hi: I am currently working on a project that would create a bridge that enables the communication of applications written using our messaging system to those applications written using ActiveMQ. The ActiveMQ package org.activemq.network.jms provides most of the functionalities I needed in my project. However, I believe that ActiveMQ only provide foreign Topic to ActiveMQ Topic and foreign Queue to ActiveMQ Queue bridges, but my project has the need for Queue to Topic and Topic to Queue bridges. I am going to write my own classes for these, but I am wondering if ActiveMQ would provide these functionalities in the future. Thanks Fan Li
RE: help needed regarding to org.activemq.network.jms package
Hi Rob: I have opened an issue at http://jira.activemq.org/jira/browse/AMQ and the Key for the issue is AMQ-520. Based on the current code for the JmsConnector and its subclasses, I think what is needed is probably two JndiTemplate objects, one for creating Foreign ConnectionFactory and one for creating Local ConnectionFactory. Fan -Original Message- From: Rob Davies [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 5:35 AM Cc: Li, Fan; activemq-dev@geronimo.apache.org Subject: Re: help needed regarding to org.activemq.network.jms package Fan Li, you can explicitly set the local ConnectionFactory on the JmsTopicConnector/JmsQueueConnector - and use the JndiTemplate for initializing the foreign JMS provider. The JmsMessageConvertor doc is misleading in it's description - for inbound messages it will expect foreign JMS - ActiveMQ and outbound ActiveMQ - JMS. The JMS specification states that a JMS message provider should be able to convert a foreign JMS Message if one is used - so this interface is only there if special marshaling is required. cheers, Rob On 1 Feb 2006, at 12:55, Rob Davies wrote: Hi Fan Li, it's great to get some feedback on this! I'm sure we can fix your issues pretty quickly. Would you mind raising a jira issue on this ? That way I won't forget about cheers, Rob First of all, my apologies for spamming your e-mail account, but I am looking for help from any ActiveMQ developer who can help me answer a couple of questions. I am currently working on a Project that would help our company to switch our existing messaging applications to used ActiveMQ instead of our own messaging system that is based on Rendezvous. My project has to do with creating a bridge that enables the communication of applications written using our messaging system to those applications written using ActiveMQ. After looking at ActiveMQ source code, I discovered a package, org.activemq.network.jms in the activemq-core/src/main/java directory, and it seems to provide the bridge functionalities I am looking for. However, when I was trying to test out the code in this package I run into a problem. The init() method in JmsTopicConnector class calls the methods initializeForeignTopicConnection() and initializeLocalTopicConnection() to set the appropriate ConnectionFactory and Connection by look them up from the JndiTemplate object of the class. The JndiTemplate object does object lookup using a Context object that is created by the implementation of InitialContextFactroy associated with java.naming.factory.initial. This is a problem because different JMS implementations have different InitialContextFactory classes, therefore it is not possible for one implementation of InitialContextFactory to create Context object that is capable of looking up objects implemented by two different JMS providers. Unless the association between java.naming.factory.initial and the InitialContextFactory can be changed between the invocation of initializeForeignTopicConnection() and initializeLocalTopicConnection(), which would require code change in the JmsTopicConnector class. Does anyone know a way to work around this problem? Also, I need a bit of clarification on the description for the JmsMesageConvertor interface. The Java doc for the convert method of this interface says that the method is used to Convert a foreign JMS Message to a native ActiveMQ Message, but should it also be used to perform the reverse conversion, which is to convert from a native ActiveMQ Message to a foreign JMS Message or is there a different interface that takes care of it? Thank you Fan Li