Issue Details (XML | Word | Printable)

Key: AMQ-1273
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: James Strachan
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

allow JDBC master/slave to startup asynchronously so that applications using a slave don't block on startup

Created: 12/Jun/07 01:06 AM   Updated: Friday 11:41 AM
Return to search
Component/s: Broker
Affects Version/s: None
Fix Version/s: 5.4.0

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ThreadBrokerFactory.java 2009-06-18 07:04 AM Raphaël Ramirez 2 kB


 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Manish Bellani added a comment - 31/Jul/07 01:46 PM
We have exact same problem in our application at the moment, i'm trying an approach where i am starting the broker in the separate thread. any other tips i can use? is there a patch available for this feature?

Raphaël Ramirez added a comment - 18/Jun/09 07:04 AM
This request looks fixed for a J2EE compliant server, (https://issues.apache.org/activemq/browse/AMQ-1519) but it didn't fix the problem for an embedded broker in Tomcat for example.

But thank to Samuel Liard, the solution for non a J2EE servers is now given here : http://www.net-liard.com/blog/2009/04/activemq/

The ThreadBrokerFactoryBean.java file is found in his application sample :
http://www.net-liard.com/blog/wp-content/uploads/2009/04/activemq.zip

However, I've attached a modified version that may be directly called from a Spring configuration file.
You just have to add start="false" in your existing broker declaration and reference your broker in the brokerFactory bean declaration.

<amq:broker id="myBrokerService" start="false">
...
</amq:broker>

<bean id="brokerFactory" class="app.activemq.ThreadBrokerFactory">
<property name="brokerService" ref="myBrokerService"/>
</bean>