You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Jean-Baptiste Onofré <jb...@nanthrax.net> on 2009/03/12 12:43:52 UTC
Re: How to enable a event during a shutdown and start up ofservicemix-component
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" ganeshsurathkal@gmail.com 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.
>
>
>
>
Re: How to enable a event during a shutdown and start up
ofservicemix-component
Posted by navigator09 <ga...@gmail.com>.
Hi JB,
I am trying to persist contents of datastructure defined inside
servicemix-camel component. The vector contains information about submitted
jobs. So before the servicemix camel component goes down the data inside
datastructure needs to be persisted. when the component starts up again, the
data structure has to be filled in with the persisted data, so that polling
for the jobs can continue. How do I do this?
Regards,
Ganesh
jb-58 wrote:
>
> 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" ganeshsurathkal@gmail.com 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.
>>
>>
>>
>>
>
>
>
>
--
View this message in context: http://www.nabble.com/Re%3A-How-to-enable-a-event-during-a-shutdown-and-start-up-ofservicemix-component-tp22474634p22474978.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.