This content has been marked as final.
Show 4 replies
-
1. Re: Is it possible to change the name of the message table i
beve Aug 6, 2009 3:05 AM (in response to mferguson)Hi,
depending on the database you are using you can modify:jbossesb.esb/message-store-sql/<database-name>/create_database.sql
Regards,
/Daniel -
2. Re: Is it possible to change the name of the message table i
mferguson Aug 6, 2009 9:43 AM (in response to mferguson)"beve" wrote:
Hi,
depending on the database you are using you can modify:jbossesb.esb/message-store-sql/<database-name>/create_database.sql
Regards,
/Daniel
Of course, but how will DBMessageStoreImpl recognize that the table name has changed when it is storing/retrieving messages? There must be some basic SQL generation or even hard coded statements in the code.
Perhaps I'll do some repository browsing...
Thanks for your reply Daniel! -
3. Re: Is it possible to change the name of the message table i
beve Aug 7, 2009 2:44 AM (in response to mferguson)Of course, but how will DBMessageStoreImpl recognize that the table name has changed when it is storing/retrieving messages?
The default name is 'message' but this can be configured in jbossesb.sar/jbossesb-properties.xml by setting the property 'org.jboss.soa.esb.persistence.db.table'.
For example:<properties name="dbstore"> <property name="org.jboss.soa.esb.persistence.db.table" value="MESSAGE"/> ... </properties>
Can you give that a try?
Regards,
/Daniel -
4. Re: Is it possible to change the name of the message table i
mferguson Aug 7, 2009 5:11 PM (in response to mferguson)"beve" wrote:
Can you give that a try?
Regards,
/Daniel
Thanks for the pointer, I changed the property to reference the table name 'ESB_MESSAGE' and as it turned out I also needed to re-configure the MessageStoreDatabaseInitializer MBean in /deploy/jbossesb.esb/jbossesb-service.xml as follows:<server> <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer" name="jboss.esb:service=MessageStoreDatabaseInitializer"> <attribute name="Datasource">java:/JBossESBDS</attribute> <attribute name="ExistsSql">select count(*) from ESB_MESSAGE</attribute> <attribute name="SqlFiles"> message-store-sql/mssql/create_database.sql </attribute> <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends> </mbean> </server>
Prior to that it was using the wrong sqlExists test and trying to initialize the database from the hsql folder. now it workls like a charm.