Hi Ganesh,

You can setup the ActiveMQ embedded in ServiceMix to persist current message 
exchanges in transit.

To do it, in the conf/activemq.xml, you can setup the persistenceAdapter :

 <amq:persistenceAdapter>
      <amq:journaledJDBC journalLogFiles="5" 
dataDirectory="/<shared>/data/amq"/>
 </amq:persistenceAdapter>

This configuration uses a Derby embedded database (file based), but you can 
setup persistence adapter on another database (like 
Oracle) :

<amq:persistenceAdapter>
      <amq:jdbcPersistenceAdapter dataSource="#oracle-ds" /> 
</amq:persistenceAdapter>

<bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" 
destroy-method="close">
         <property name="driverClassName" 
value="oracle.jdbc.driver.OracleDriver" /> 
  <property name="url" value="jdbc:oracle:thin:@192.168.1.4:1521:mydbname" /> 
  <property name="username" value="smix_node1_ha" /> 
  <property name="password" value="smix_node1_ha" /> 
  <property name="poolPreparedStatements" value="true" /> 
</bean>

However, this configuration will persist message exchanges : if you shutdown 
your component or your SMX instance, the exchanges 
will be stored and when the component or SMX instance will start again, the 
exchanges will be reinjected in.

What kind of data do you want to store during a component shutdown ?

Regards
JB

On Thu 12/03/09 12:31, "navigator09" [email protected] wrote:
> 
> Hi,
> 
> I need to persist information when a specific component shuts down and
> retrive the information when it starts. I did look into the mailing
> lists
and the forums but so far I didnt get any clear picture on how to do 
> this.
Pls let me know if this is possible
> 
> Regards,
> Ganesh
> -- 
> View this message in context: 
> http://www.nabble.com/How-to-enable-a-event-during-a-shutdown-a
> nd-start-up-of-servicemix-component-tp22473913p22473913.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 
> 
> 
> 


Reply via email to