6 Replies Latest reply on Feb 20, 2002 2:53 AM by sachinshah

    A Question on Durable Subsription

    sachinshah

      Hello,

      I have a following scenario. A user has a durable subscription to multiple topics. This will require a unique id to be assigned to JMSConnection. Each user has a unique id called userid which can be used to assign to Connection. In weblogic we were creating the connection and setting the clientID using setClientId() with the userid , which is the preferred way, and while subscribing to a topic we use to give a userid again. The no. of user is not fix, today 5 users would be connecting to App server while tomorrow few more might get added. Everything was working fine.
      I am trying the same code in JBoss now. The problem here is JBoss does not allow me to call the setClientId() on a connection and throws exception. For assigning the unique id to connection i have to have an entry into jbossmq-state.xml with the user name and password as mentioned in the file. If i do this which means every user which will get added to my application will have to have an entry into jbossmq-state.xml file which is manual process and requires restart of the server which is a tedious task. And also the code becomes application server specific.

      I want to know whether my understanding of the JBossMQ working is correct. And i want to have an idea as to how to handle this situation of durable subscription without making the code Application server specific and also does not require the above mentioned manual intervention.

        • 1. Re: A Question on Durable Subsription
          hchirino

          Your understanding is correct.

          Creating durable subscriptions uses up server resources (disk space!). This is why JBossMQ forces users to be predefined before they can create durable subscriptions.
          Otherwise, a the server can be brought down by a malicious user.

          I agree with you that having to restart the server to add a user is not a good solution. What we need to add is a way to manage users better, via JMX??? If you whish to talkel this feature, let me know and I give you any assistance you need.

          Regards,
          Hiram

          • 2. Re: A Question on Durable Subsription

            The user "definition" should really be agumented with the JAAS stuf in JBoss, so that we could have one common user database (file,rdbm,ldap, whatever) behind whole JBoss.

            This would be nice if someone could tackle.

            //Peter

            • 3. Re: A Question on Durable Subsription
              sachinshah

              Hiram,

              Thanks for the reply. I would definately want to solve this issue in a manner which is not any application server specific. At the same time i would like to inform you that here we are not using application server security feature. i.e. we have our own table for doing user authentication for some specific reasons.

              Another thing, i know it's not the correct thread, that JBossMQ for DB is not at all working in either 2.4.3 or 2.4.4 atleast as far as i tried my best. It refuse to start up.

              • 4. Re: A Question on Durable Subsription

                > Hiram,
                >
                > Thanks for the reply. I would definately want to
                > solve this issue in a manner which is not any
                > application server specific
                . At the same time i
                > would like to inform you that here we are not using
                > application server security feature. i.e. we have our
                > own table for doing user authentication for some
                > specific reasons.

                One of the points with using JAAS for this is that it makes the backend where the user data is stored pluggable.

                //Peter

                • 5. Re: A Question on Durable Subsription
                  sachinshah

                  What happened to the Generic solution. I am still waiting for this. My Application is on the verge of going live. What do i do. I can not even try another app server

                  • 6. Re: A Question on Durable Subsription
                    sachinshah

                    What happened to the Generic solution. I am still waiting for this. My Application is on the verge of going live. What do i do. I can not even try another app server.
                    Only alternative is to switch to another App server