You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "J. Patrick Bedell" <jp...@gmail.com> on 2006/11/21 00:50:50 UTC
obtaining a DataSource bean from a BrokerFilter-based plugin?
Hi,
I'm trying to utilize (in the attached activemq configuration file)
the derby-ds DataSource that is commented out in the default
configuration, which has the bean element
<bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
<property name="databaseName" value="derbydb"/>
<property name="createDatabase" value="create"/>
</bean>
I'm also writing an interceptor that extends BrokerFilter, so that
I can have an ActiveMQ-specific plugin. My question is, how would I
obtain the "derby-ds" DataSource in my BrokerFilter-based plugin? (I
have the suspicion that this is an extremely simple question, but I
don't know the answer and I'm not familiar enough with Spring to find
it. :)
Thanks!
--
J. Patrick Bedell
jpbedell@gmail.com
http://infoeng.sourceforge.net
http://rothbardix.blogspot.com
Re: obtaining a DataSource bean from a BrokerFilter-based plugin?
Posted by Hiram Chirino <hi...@hiramchirino.com>.
so something like:
<p:TestICTPInterceptor dataSource="#derby-ds"/>
and make sure your TestICTPInterceptor has a setDataSource(DataSource
ds) method.
On 11/20/06, J. Patrick Bedell <jp...@gmail.com> wrote:
> Hi,
> I'm trying to utilize (in the attached activemq configuration file)
> the derby-ds DataSource that is commented out in the default
> configuration, which has the bean element
>
> <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
> <property name="databaseName" value="derbydb"/>
> <property name="createDatabase" value="create"/>
> </bean>
>
> I'm also writing an interceptor that extends BrokerFilter, so that
> I can have an ActiveMQ-specific plugin. My question is, how would I
> obtain the "derby-ds" DataSource in my BrokerFilter-based plugin? (I
> have the suspicion that this is an extremely simple question, but I
> don't know the answer and I'm not familiar enough with Spring to find
> it. :)
> Thanks!
>
> --
> J. Patrick Bedell
> jpbedell@gmail.com
> http://infoeng.sourceforge.net
> http://rothbardix.blogspot.com
>
>
>
--
Regards,
Hiram
Blog: http://hiramchirino.com