Hi Davis,
first note that ActiveMQ persistence mechanism is used to store messages
"inside" the broker so that messages that are not consumed are not lost in
case of a broker shutdown. So if you want to change that internal mechanism
you should implement your own jdbc persistent adapter. Take a look at these
classes for some starting points

http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java?view=markup

http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/OracleJDBCAdapter.java?view=log

On the other hand, if you wish to create a consumer that will consume and
save the messages in the database for some other application to use them,
you should use Camel. There are variety of components you can use for that,
such as sql, jdbc, hibernate or iBatis (
http://activemq.apache.org/camel/components.html) and you shold use one that
fits you application the best.

Cheers

--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Jan 6, 2009 at 6:43 PM, davis <davisf...@gmail.com> wrote:

>
> Hi,
>
> I have defined a single ObjectMessage type for a queue, and I am using
> journaling with JDBC persistence to Oracle -- everything is working fine.
>
> However, the schema activemq creates auto-magically stores the message as a
> BLOB.  I can understand why, but I would like to change this.
>
> I would like to store the message in a custom table.  The
> ObjectMessage#getObject() returns a simple bean I created with get/set for
> String/int.  I would like to persist this in a custom table so it is
> available for querying against (as opposed to a BLOB in ACTIVEMQ_MSGS.MSG)
>
> I am guessing I'll probably have to use Hibernate & Camel to achieve this?
> Any recommendations on how to proceed?
>
> Thanks in advance,
> Davis
> --
> View this message in context:
> http://www.nabble.com/ActiveMQ-Persistence-Question---JDBC-or-Hibernate-tp21315205p21315205.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Reply via email to