• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to use MSSQL for JMS

 
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
could anyone please tell me the procedure to use mssql for messaging in JBoss 5. i am using mssql as my datasource. should i replace hsqldb-persistence-service.xml with mssql-persistence-service.xml?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of JBoss AS, and if you are using 4.2.x, did you install JBoss Messaging and if so which version?

For JBoss AS 5.0.1.GA, the steps were recently discussed at http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224936#4224936. While that discussion centered on MySQL, the steps for SQL Server should be similar.
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter,
thanks for your suggestion, it works fine.
One more thing I want to know is that previously there was a file jbossmq-state.xml in %JBOSS_HOME%/server/xxx/conf folder in which we define users and their roles etc. in JBOSS AS 5, which is the corresponding file in which we can do the same?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like this file was used to provide a means to initialize the database with some users and roles. You can do the same in the mysql-persistence-service.xml file, look at the POPULATE.TABLES.NN entries at the end of the file. Personally, other than for testing, I think that this is the wrong way to populate the database with users and roles.
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes Peter, you are right, I am too thinking that this is not the right way to populate database with users and roles. I search on google but find no way to create users and roles. The only way i can see is through xxx-persistance-service.xml.
if we create users and roles in this way how we can connect a user with a durable topic subscription because i dont know which table is used for which purpose?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One possibility: populate the tables using SQL statements fed to the mysql utility.

In JBoss in Action, I define a completely separate database to hold the messaging users and use SQL statements to populate that database. Then I set up a database login module that uses that database for authentication, and reference that login module from JMS. Thus that example completely ignores that users and roles tables created by the messaging service. Actually, if I wanted to I could have simply remobed those tables and the SQL statements that use them from the *-persistence-service.xml file, but I didn't.
 
reply
    Bookmark Topic Watch Topic
  • New Topic