Hello fawce,
thanks for your quick reply.
I have had already tried out the jbossmq-state.xml file and deployed it to
jboss/server/default/conf, as well as the file-state-service.xml to the
jboss/server/default/deploy/jms folder. while deploying, JBoss brings up a failure,
because the StateManager-MBean has already been registered. See the errors below:
| [exec] 19:04:34,272 ERROR [MainDeployer] Could not create deployment:
file:/D:/Programme/jboss-4.0.5.GA/server/default/deploy/jms/file-state-service.xml
| [exec] org.jboss.deployment.DeploymentException: Trying to install an already
registered mbean: jboss.mq:service=StateManager
|
I found out, that the StateManager is already started by the hsqldb-jdbc-state-service.xml
file in the jboss/server/default/deploy/jms folder. It actually starts the StateManager
MBean and stores all the information about JMS users and roles into the integrated HSQL
Database (Hypersonic). Following listing shows you the content of hsqldb-jdbc-state.xml.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- hsqldb-jdbc-state-service.xml 23386 2004-09-03 21:38:12Z ejort -->
|
|
| <server>
|
| <!-- ==================================================================== -->
| <!-- JBossMQ State Management using HSQLDB -->
| <!-- See docs/examples/jms for other configurations -->
| <!-- ==================================================================== -->
|
| <!-- A Statemanager that stores state in the database -->
| <mbean code="org.jboss.mq.sm.jdbc.JDBCStateManager"
| name="jboss.mq:service=StateManager">
| <depends
optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
| <attribute name="SqlProperties">
| CREATE_TABLES_ON_STARTUP = TRUE
| CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD
VARCHAR(32) NOT NULL, \
| CLIENTID VARCHAR(128), PRIMARY
KEY(USERID))
| CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID
VARCHAR(32) NOT NULL, \
| PRIMARY KEY(USERID, ROLEID))
| CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID
VARCHAR(128) NOT NULL, \
| SUBNAME VARCHAR(128) NOT NULL, TOPIC
VARCHAR(255) NOT NULL, \
| SELECTOR VARCHAR(255), PRIMARY
KEY(CLIENTID, SUBNAME))
| GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE
CLIENTID=? AND SUBNAME=?
| LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE
CLIENTID=? AND SUBNAME=?
| GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM
JMS_SUBSCRIPTIONS WHERE TOPIC=?
| INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC,
SELECTOR) VALUES(?,?,?,?)
| UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE
CLIENTID=? AND SUBNAME=?
| REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND
SUBNAME=?
| GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE
CLIENTID=?
| GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
| POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES
('guest', 'guest')
| POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES
('j2ee', 'j2ee')
| POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES
('john', 'needle', 'DurableSubscriberExample')
| POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES
('nobody', 'nobody')
| POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES
('dynsub', 'dynsub')
| POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('guest','guest')
| POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('j2ee','guest')
| POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('john','guest')
| POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('subscriber','john')
| POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('publisher','john')
| POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('publisher','dynsub')
| POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('durpublisher','john')
| POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('durpublisher','dynsub')
| POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES
('noacc','nobody')
| </attribute>
| </mbean>
|
| </server>
|
|
As you can see, it has the same content (same users and roles e.g. dynsub) like the
jbossmq-state.xml has - it just stores them into the database as you can see in the
following image. The image shows the HSQL Database Manager and the content of one of these
tables.
[
img]http://markus-kolp.jimdo.com/cc_images/cache_3071238.jpg[/img]
I'm using JBoss 4.0.5. This version automatically supplies this file and chooses this
way via the database - and not the jbossmq-state.xml file.
I've tried to remove the hsqldb-jdbc-state-service.xml file and afterwards deploying
the jbossmq-state.xml file.
Then I tested the application again, but I still get the same error messages.
I also tried out the way with the config file (csil-conf.xml) you mentioned, but it
doesn't work either.
Do you have a complete
VS.NET project/solution that I could try out? My email is
markus.kolp(a)freenet.de.
What else could I be doing wrong?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015946#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...