Hi Joel,

for now, the servicemix-jdbc component is not yet ready.

However, you can use a servicemix-bean to store on the database. I have written a sample to show how to do:
http://svn.apache.org/repos/asf/servicemix/smx3/trunk/samples/database-bean/

So, to summarize, you need two SUs:

1/ SMPP consumer SU with the following xbean.xml:
<smpp:consumer service="test:service"
               endpoint="endpoint"
               targetService="test:service"
               targetEndpoint="database"
               host="smpp.example.com"
               port="2700"
               systemId="user"
               password="passwd"/>
This SMPP consumer endpoint will receive messages from the SMPP server and route it to the database endpoint.
2/ Bean SU with the following xbean.xml:

<bean:endpoint service="test:service" endpoint="database" bean="#databaseBean"/>
  <bean id="databaseBean" class="com.example.DatabaseBean"/>
</beans>

The DatabaseBean takes the incoming message (as formatted by the SMPP endpoint), parse it to extract data and store into a database.
I let you code the DatabaseBean using the sample.

Regards
JB

gardion1 wrote:
Hello all,

I'm fairly new to service mix but I have installed it and followed the
tutorials 1-3.  Seeing as service mix is new to me I thought I would ask
what the best approach would be for solving a problem

I am working on a service that would take messages received from smpp and
write them to a mysql database.  (the sms message that comes in will contain
xml like <mymessage>hello<mymessage>)

what jbi components would be the best to use in order to do that?  I know
about the servicemix-smpp and I have managed to set it up to receive
messages from an smsc emulator.  However, what other components would I need
to talk to mysql?  I'm assuming I would use JDBC to do that.

I will also be doing the reverse and having the mysql database send an xml
message that should be sent out by smpp.
Any thoughts?

Thank you,

Joel

Reply via email to