Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 32151 invoked from network); 2 Feb 2007 14:24:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2007 14:24:28 -0000 Received: (qmail 75496 invoked by uid 500); 2 Feb 2007 14:24:34 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 75472 invoked by uid 500); 2 Feb 2007 14:24:34 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 75452 invoked by uid 500); 2 Feb 2007 14:24:33 -0000 Delivered-To: apmail-geronimo-activemq-dev@geronimo.apache.org Received: (qmail 75192 invoked by uid 99); 2 Feb 2007 14:24:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 06:24:32 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 06:24:24 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E177571408A for ; Fri, 2 Feb 2007 06:24:02 -0800 (PST) Message-ID: <20949725.1170426242919.JavaMail.jira@brutus> Date: Fri, 2 Feb 2007 06:24:02 -0800 (PST) From: "Christopher G. Stach II (JIRA)" To: activemq-dev@geronimo.apache.org Subject: [jira] Updated: (AMQ-1147) Spring AspectJ autoproxying breaks ActiveMQManagedConnectionFactory injection In-Reply-To: <5643847.1170394442841.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christopher G. Stach II updated AMQ-1147: ----------------------------------------- Attachment: AMQ-1147.patch This patch takes care of the issue. It's really messy because I had to add Javadocs all over to get Eclipse to compile the files. ( My project settings require Javadocs, comments in empty blocks, no unnecessary else blocks, etc., but I was too tired to change them.) Here's basically what I had to do: * Extract interfaces for ActiveMQActivationSpec and ActiveMQResourceAdapter * AMQRAImpl: Fix a couple AMQActivationSpec equality checks * AMQRAImpl: Use method calls on the AMQRA interface instead of field access in equals * AMQMCF: Added instanceof check in setResourceAdapter > Spring AspectJ autoproxying breaks ActiveMQManagedConnectionFactory injection > ----------------------------------------------------------------------------- > > Key: AMQ-1147 > URL: https://issues.apache.org/activemq/browse/AMQ-1147 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 4.1.0 > Reporter: Christopher G. Stach II > Priority: Blocker > Attachments: AMQ-1147.patch > > > The cast to the concrete class at ActiveMQManagedConnectionFactory:50 fails: > public void setResourceAdapter(ResourceAdapter adapter) throws ResourceException { > this.adapter = (ActiveMQResourceAdapter) adapter; > org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy63] to required type [javax.resource.spi.ResourceAdapter] for property 'resourceAdapter'; nested exception is java.lang.ClassCastException: $Proxy63 cannot be cast to org.apache.activemq.ra.ActiveMQResourceAdapter > Caused by: java.lang.ClassCastException: $Proxy63 cannot be cast to org.apache.activemq.ra.ActiveMQResourceAdapter > at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.setResourceAdapter(ActiveMQManagedConnectionFactory.java:50) > 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:597) > at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:786) > [...] > Spring (2.0.3 build 66) config: > > > > > > > > > > ${amq.serverUrl} > > > There's probably a workaround for this, but it's still annoying. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.