Apologies, I attached the wrong file. Regards, Adrian
On Tue, 2003-12-09 at 15:39, Adrian Brock wrote: > On Tue, 2003-12-09 at 01:30, Bruce Slawson wrote: > > <fontfamily><param>Courier</param>Ivelin, > > > > > > Thanks, that explains a lot. > > > > > > All I want to do right now is load balance my MDBs which looks like it > > should work fine. I will be using a shared database to persist the > > queues. What do I need to configure to use the JMS clustering and > > load balanced MDBs? Its not very clear. > > > > Seem's clear to me, load balancing is not supported. All requests > go to the singleton jms machine. If that machine dies, another > machine recovers from the db and takes over as the jms server. > > Completely separate from HA, it is possible to configure > jboss's mdb to listen to multiple servers. > You do this configuring multiple jms providers and then > attaching an invoker proxy binding for each provider to > the mdb. > That way clients can send to any machine and the mdb will > retrieve it. But this does not provide failover. > e.g. If the client sends a message to a server that dies before > the mdb retrieves it, you will have to wait until the server > recovers before the mdb processes it. > > > > > Also, another thing I am not sure about is the "state manager" that > > you mention in this doc. You say this needs to be a "JDBC state > > manger" for fail-over to work. Is this something different than using > > a database for the JMS persistence? How do I configure it? > > > > The JDBC StateManager replaces the file StateManager (which takes and > stores its state in conf/jbossmq-state.xml) configured in > jbossmq-service.xml > > The file statemanager does not work with failover, because > any dynamic durable subscriptions created on one machine are > unknown to other machines. > > Here is an example deployment that will be included in > docs/examples/jms from 3.2.4 > I've included it as an attachment as well since e-mail > is likely to screw up the formating. > It details the other configuration instructions. > > <?xml version="1.0" encoding="UTF-8"?> > > <!-- $Id: hsqldb-jdbc-state-service.xml,v 1.1.2.1 2003/12/09 15:26:18 > ejort Exp $ --> > > <server> > > <!-- > ==================================================================== --> > <!-- JBossMQ State Management using > HSQLDB --> > <!-- See docs/examples/jms for other > configurations --> > > <!-- --> > <!-- IMPORTANT OTHER CONFIGURATION > INSTRUCTIONS --> > > <!-- --> > <!-- 1) Remove the File StateManager from > deploy/jms/jbossmq-service.xml --> > <!-- 2) Replace the jbossmq configuration with the > following --> > <!-- database login module in > conf/login-config.xml --> > <!-- > <application-policy name = "jbossmq"> > <authentication> > <login-module code = > "org.jboss.security.auth.spi.DatabaseServerLoginModule" > flag = "required"> > <module-option name = > "unauthenticatedIdentity">guest</module-option> > <module-option name = > "dsJNDI">java:/DefaultDS</module-option> > <module-option name = "principalsQuery">SELECT PASSWD FROM > JMS_USERS WHERE USERID=?</module-option> > <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' > FROM JMS_ROLES WHERE USERID=?</module-option> > </login-module> > </authentication> > </application-policy> > --> > <!-- To configure users use sql, > e.g. --> > <!-- insert into JMS_USERS (USERID, PASSWD) VALUES('guest', > 'guest') --> > <!-- insert into JMS_ROLES (USERID, ROLEID) VALUES('guest', > 'guest') --> > <!-- To configure durable subscritpions use sql, > e.g. --> > <!-- insert into JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, > TOPIC) --> > <!-- VALUES('clientid', 'subscription', > 'testDurableTopic') --> > <!-- > ==================================================================== --> > > <!-- 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=LocalTxCM,name=DefaultDS</depends> > <attribute name="SqlProperties"> > 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=? > CREATE_TABLES_ON_STARTUP = TRUE > </attribute> > </mbean> > > </server> > > Regards, > Adrian > > > > > Thanks, > > > > Bruce > > > > </fontfamily><fontfamily><param>Times</param><bigger><bigger> > > > > </bigger></bigger></fontfamily> > > > > > > On Dec 6, 2003, at 9:11 AM, Ivelin Ivanov wrote: > > > > > > <excerpt> > > > > See this document for a detailed description: > > > > http://www.cocoonhive.org/articles/jboss/20031125/JBoss32-hajms.html > > > > > > The code is simple and solid. > > > > If you describe your use case I may be able to advise > > > > whether it will work for you. > > > > > > Regards, > > > > > > Ivelin > > > > > > > > --- Sacha Labourey <<[EMAIL PROTECTED]> > > > > wrote: > > > > <excerpt>I don't think it is fulll JMS Clustering, but a > > > > clustered invocation layer. > > > > > > <excerpt>-----Original Message----- > > > > From: [EMAIL PROTECTED] > > > > [mailto:[EMAIL PROTECTED] On > > > > </excerpt>Behalf Of > > > > <excerpt>Bill Burke > > > > Sent: samedi, 6. dÃcembre 2003 04:23 > > > > To: [EMAIL PROTECTED]; > > > > </excerpt>[EMAIL PROTECTED] > > > > <excerpt>Subject: Re: [JBoss-user] JMS Clustering > > > > > > Ivelin will have to answer this. > > > > > > Bill > > > > > > Bruce Slawson wrote: > > > > > > <excerpt>I looks like 3.2.3 now includes JMS clustering. > > > > </excerpt></excerpt>I have a couple of > > > > <excerpt><excerpt>questions... > > > > > > Is it robust and ready for a production > > > > </excerpt></excerpt>environment? > > > > <excerpt><excerpt>Does is provide fail over, load balancing, or > > > > </excerpt></excerpt>both? > > > > <excerpt><excerpt>Are MDBs now clustered as well? > > > > Are there any docs on how to configure and use > > > > </excerpt></excerpt>JMS clustering? > > > > <excerpt><excerpt> > > > > Thanks, > > > > Bruce > > > > > > > > > > > > > > </excerpt></excerpt> > > > > </excerpt>------------------------------------------------------- > > > > <excerpt><excerpt><excerpt>This SF.net email is sponsored by: IBM Linux > > > > </excerpt></excerpt>Tutorials. > > > > <excerpt><excerpt>Become an expert in LINUX or just sharpen your > > > > </excerpt></excerpt>skills. > > > > <excerpt>Sign up for IBM's > > > > <excerpt>Free Linux Tutorials. Learn everything from the > > > > </excerpt></excerpt>bash shell > > > > <excerpt>to sys admin. > > > > <excerpt>Click now! > > > > </excerpt></excerpt> > > > > </excerpt>http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > > > > <excerpt><excerpt><excerpt>_______________________________________________ > > > > JBoss-user mailing list > > > > [EMAIL PROTECTED] > > > > > > </excerpt></excerpt> > > > > </excerpt>https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > <excerpt><excerpt><excerpt> > > > > > > </excerpt> -- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
<?xml version="1.0" encoding="UTF-8"?> <!-- $Id: hsqldb-jdbc-state-service.xml,v 1.1.2.1 2003/12/09 15:26:18 ejort Exp $ --> <server> <!-- ==================================================================== --> <!-- JBossMQ State Management using HSQLDB --> <!-- See docs/examples/jms for other configurations --> <!-- --> <!-- IMPORTANT OTHER CONFIGURATION INSTRUCTIONS --> <!-- --> <!-- 1) Remove the File StateManager from deploy/jms/jbossmq-service.xml --> <!-- 2) Replace the jbossmq configuration with the following --> <!-- database login module in conf/login-config.xml --> <!-- <application-policy name = "jbossmq"> <authentication> <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required"> <module-option name = "unauthenticatedIdentity">guest</module-option> <module-option name = "dsJNDI">java:/DefaultDS</module-option> <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option> <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option> </login-module> </authentication> </application-policy> --> <!-- To configure users use sql, e.g. --> <!-- insert into JMS_USERS (USERID, PASSWD) VALUES('guest', 'guest') --> <!-- insert into JMS_ROLES (USERID, ROLEID) VALUES('guest', 'guest') --> <!-- To configure durable subscritpions use sql, e.g. --> <!-- insert into JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC) --> <!-- VALUES('clientid', 'subscription', 'testDurableTopic') --> <!-- ==================================================================== --> <!-- 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=LocalTxCM,name=DefaultDS</depends> <attribute name="SqlProperties"> 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=? CREATE_TABLES_ON_STARTUP = TRUE </attribute> </mbean> </server>