1 2 3 4 5 6 Previous Next 82 Replies Latest reply on May 24, 2011 10:29 AM by jason.greene Go to original post
      • 30. Re: Resource Adapter integration on AS7
        ataylor

        since we were already discussing it on this forum and you guys are my intended audience i thought it would be better to discuss it here. Why don't you guys start it how you want it to be done and we can fill in the gaps once you have something up and running, tbh I'm starting to get quite irate with the whole thing!

        • 31. Resource Adapter integration on AS7
          jason.greene

          Andy Taylor wrote:

           

          Guys,

           

           

          However even tho when i debug i see that this is parsed correctly my 'HornetQConnectionSubsystemAdd' never gets called.

           

          The way subsystems bootstrap is the following

          1. An extension, which is directly referenced by module name in the standalone/domain is loaded
          2. The extension registers a portion of the management model representation (tree structure) that all management calls operate on. More specifically an ADD operation is registered for the address (subsystem=foo) that points to the SubsystemAdd class you want
          3. The parser registered by 1 is responsible for translating the XML into the ADD operation referred to in 2, and all additional operations needed to construct the subsystem
          4. After all xml parsing has completed the operations are executed

           

          So in a nutshell, the code path for both configuration and live management calls is mostly the same.

          • 32. Resource Adapter integration on AS7
            jason.greene

            Andy Taylor wrote:

             

            since we were already discussing it on this forum and you guys are my intended audience i thought it would be better to discuss it here. Why don't you guys start it how you want it to be done and we can fill in the gaps once you have something up and running, tbh I'm starting to get quite irate with the whole thing!

             

            It doesn't seem too much to ask that we all work together on this. Ultimately we all want the same thing (at least I hope), which is an extremely fast AS/EAP that developers can build awesome messaging apps with. I am biased, but I view this work as extremely important, important enough that it justifies someone on the messaging team taking a couple weeks away from project work to focus on what people will be using in our future product.

            • 33. Resource Adapter integration on AS7
              ataylor

              The way subsystems bootstrap is the following

              1. An extension, which is directly referenced by module name in the standalone/domain is loaded
              2. The extension registers a portion of the management model representation (tree structure) that all management calls operate on. More specifically an ADD operation is registered for the address (subsystem=foo) that points to the SubsystemAdd class you want
              3. The parser registered by 1 is responsible for translating the XML into the ADD operation referred to in 2, and all additional operations needed to construct the subsystem
              4. After all xml parsing has completed the operations are executed

               

              So in a nutshell, the code path for both configuration and live management calls is mostly the same.

              As far as i can see thats exactly what i have, altho like i said theres already a queueadd operation there which doesn't seem to work either.

               

              It doesn't seem too much to ask that we all work together on this. Ultimately we all want the same thing (at least I hope), which is an extremely fast AS/EAP that developers can build awesome messaging apps with. I am biased, but I view this work as extremely important, important enough that it justifies someone on the messaging team taking a couple weeks away from project work to focus on what people will be using in our future product.

              I agree 100% and its not about me, or another messaging bod, spending a few weeks, in fact we want to help as much as possible to fo this. What i need is someone to

               

              1. take a look at my branch and explain to me why it doesnt work rather than me stumble about for days trying to figure it out using debugging.

               

              and

               

              2. review what i'm currently doing and make sure its along the lines of what everyone wants.

              • 34. Resource Adapter integration on AS7
                clebert.suconic

                Jason: All Andy is asking is a hand on looking at the current state...  We need some guidance on this.. that's all.

                • 35. Resource Adapter integration on AS7
                  jason.greene

                  Andy Taylor wrote:

                   

                  The way subsystems bootstrap is the following

                  1. An extension, which is directly referenced by module name in the standalone/domain is loaded
                  2. The extension registers a portion of the management model representation (tree structure) that all management calls operate on. More specifically an ADD operation is registered for the address (subsystem=foo) that points to the SubsystemAdd class you want
                  3. The parser registered by 1 is responsible for translating the XML into the ADD operation referred to in 2, and all additional operations needed to construct the subsystem
                  4. After all xml parsing has completed the operations are executed

                   

                  So in a nutshell, the code path for both configuration and live management calls is mostly the same.

                  As far as i can see thats exactly what i have, altho like i said theres already a queueadd operation there which doesn't seem to work either.

                   

                  Ah ok I see the issue. You are creating an element that is PART of the messaging subsystem, and not an actual subsystem itself. A subsystem represents everything under <subsystem>, although you can model that using multiple addressable operations. For example, a queue is beneath the messaging subsystem.

                   

                  Are you trying to collapse the jms subsystem into the "messaging" one? And then also rename "messaging" to "hornetq"?

                  • 36. Resource Adapter integration on AS7
                    ataylor
                    Ah ok I see the issue. You are creating an element that is PART of the messaging subsystem, and not an actual subsystem itself. A subsystem represents everything under <subsystem>, although you can model that using multiple addressable operations. For example, a queue is beneath the messaging subsystem.

                    Yes, thats what i have done, in fact i did it the way queues are implemented as a sub model is how ive done the resource adaptor. Unfortunately tho it doesnt seem to do anything and after testing the queue implementation that was already there it turns out that doesn't work either.

                     

                    Whether or not this is the best way to do this is for the AS7 guys to decide, if theres a better way i need some direction from someone, alternatively someone to take look at my branch and see if ive done something wrong. either way im kinda stuck at this point.

                     

                    Are you trying to collapse the jms subsystem into the "messaging" one? And then also rename "messaging" to "hornetq"?

                    no and no.

                    • 37. Resource Adapter integration on AS7
                      ataylor

                      actually, having thought about it i think it maybe better to have the hornetq ra as its own subsystem, I only really did it this way as its the way Stefano originally suggested. so it should look something like this

                       

                               <subsystem xmlns="urn:jboss:domain:messaging:ra:1.0">

                                  <outgoing>

                                      <in-vm>

                                          <jndi-name>java:/JmsXA</jndi-name>

                                          <server-id>0</server-id>

                                      </in-vm>

                                  </outgoing>

                              </subsystem>

                       

                      If no one has any problems with this i will plough on

                      • 38. Resource Adapter integration on AS7
                        jason.greene

                        Andy Taylor wrote:

                         

                        Ah ok I see the issue. You are creating an element that is PART of the messaging subsystem, and not an actual subsystem itself. A subsystem represents everything under <subsystem>, although you can model that using multiple addressable operations. For example, a queue is beneath the messaging subsystem.

                        Yes, thats what i have done, in fact i did it the way queues are implemented as a sub model is how ive done the resource adaptor. Unfortunately tho it doesnt seem to do anything and after testing the queue implementation that was already there it turns out that doesn't work either.

                         

                         

                        Well in your change you deleted the messaging subsystem, and added a new subsystem to represent nested content. Subsystems are only top-level notions. The submodel approach is right, but then you need both the subsystem and the nested submodel operation to be registered. You also need the parser to construct the operation, which your patch isn't doing.

                         

                        Are you sure queues were not working before you change? We have test cases and demos that use them.

                        • 39. Resource Adapter integration on AS7
                          ataylor
                          Well in your change you deleted the messaging subsystem, and added a new subsystem to represent nested content

                          How did I delete it, as far as i was aware i had only added a submodel to it?

                           

                          The submodel approach is right,

                          Do you think, after looking at it more closely I prefer (from a configuration pov) to have the ra stuff as a subsystem

                           

                          but then you need both the subsystem and the nested submodel operation to be registered

                          They are registered, see MessagingExtension

                           

                          <snippet>

                          final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME);

                          final ModelNodeRegistration registration = subsystem.registerSubsystemModel(MessagingSubsystemProviders.SUBSYSTEM);

                          ........

                          final ModelNodeRegistration ra = registration.registerSubModel(PathElement.pathElement(RESOURCE_ADAPTOR), MessagingSubsystemProviders.RESOURCE_ADAPTOR_RESOURCE);

                          ra.registerOperationHandler(ADD, HornetQConnectionSubsystemAdd.INSTANCE, HornetQConnectionSubsystemAdd.INSTANCE, false);

                          </snippet>

                          • 40. Resource Adapter integration on AS7
                            jason.greene

                            Andy Taylor wrote:

                             

                            Well in your change you deleted the messaging subsystem, and added a new subsystem to represent nested content

                            How did I delete it, as far as i was aware i had only added a submodel to it?

                             

                             

                            Ignore that I misread the change of nuking all those comments as a cut off delete

                             

                             

                            They are registered, see MessagingExtension

                             

                            <snippet>

                            final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME);

                            final ModelNodeRegistration registration = subsystem.registerSubsystemModel(MessagingSubsystemProviders.SUBSYSTEM);

                            ........

                            final ModelNodeRegistration ra = registration.registerSubModel(PathElement.pathElement(RESOURCE_ADAPTOR), MessagingSubsystemProviders.RESOURCE_ADAPTOR_RESOURCE);

                            ra.registerOperationHandler(ADD, HornetQConnectionSubsystemAdd.INSTANCE, HornetQConnectionSubsystemAdd.INSTANCE, false);

                            </snippet>

                             

                            Right, but the parser never does calls ADD on the RESOURCE_ADAPTER, so that operation will never be performed. Note that the way queues were done is that they are passed into the subsystem add operation. So basically the entire composite of the configuration is processed at once. There is two ways to do this, you can either follow that approach of one big macro AND individual single change operations, which for some subsystems is necessary (if you for example you dont have a way to build configuration in peicemeil). Although it's not required, you can take the approach you are doing (which is actually the preferred model since we need the individual change operations anyway), however then your parser has to construct the operation.

                             

                            Take a look at the processCoreQueues method in the parser in the messaging subsystem add operation to see what I am talking about with a macro approach.

                             

                             

                            The submodel approach is right,

                            Do you think, after looking at it more closely I prefer (from a configuration pov) to have the ra stuff as a subsystem

                             

                            Well ideally the less a user has to configure the better. It seems like alot of this is duplicate of whats in the JMS subsystem. If someone is specifying the jndi name, and the connection factory and so on, do we really need to have them redeclare that in another subsystem, or can it just be implicitly derived.

                             

                            BTW I was talking to Brian about all of this, and I think the most urgent priority is to design what we want it to look like first, and then we can give you guys a hand on getting the implementation there.

                            • 41. Resource Adapter integration on AS7
                              ataylor

                              Right, but the parser never does calls ADD on the RESOURCE_ADAPTER, so that operation will never be performed. Note that the way queues were done is that they are passed into the subsystem add operation. So basically the entire composite of the configuration is processed at once. There is two ways to do this, you can either follow that approach of one big macro AND individual single change operations, which for some subsystems is necessary (if you for example you dont have a way to build configuration in peicemeil). Although it's not required, you can take the approach you are doing (which is actually the preferred model since we need the individual change operations anyway), however then your parser has to construct the operation.

                               

                              Take a look at the processCoreQueues method in the parser in the messaging subsystem add operation to see what I am talking about with a macro approach.

                              Ok, i will take a look

                               

                              Well ideally the less a user has to configure the better. It seems like alot of this is duplicate of whats in the JMS subsystem. If someone is specifying the jndi name, and the connection factory and so on, do we really need to have them redeclare that in another subsystem, or can it just be implicitly derived.

                              Well there is nothing from either the messaging or jms subsystem that is used by either outgoing RA managed factories or incoming configuration. I can do it either way, both configs will look very similar, it will just be surrounded by an extra <resource-adaptor> element if part of the messaging sub system (or should it be part of the jms subsystem).

                               

                              BTW I was talking to Brian about all of this, and I think the most urgent priority is to design what we want it to look like first, and then we can give you guys a hand on getting the implementation there.

                              sounds like a plan

                              • 42. Re: Resource Adapter integration on AS7
                                jason.greene

                                How about we do a conference call tomorrow to discuss this stuff? What times work for you guys?

                                Andy Taylor wrote:

                                 

                                Right, but the parser never does calls ADD on the RESOURCE_ADAPTER, so that operation will never be performed. Note that the way queues were done is that they are passed into the subsystem add operation. So basically the entire composite of the configuration is processed at once. There is two ways to do this, you can either follow that approach of one big macro AND individual single change operations, which for some subsystems is necessary (if you for example you dont have a way to build configuration in peicemeil). Although it's not required, you can take the approach you are doing (which is actually the preferred model since we need the individual change operations anyway), however then your parser has to construct the operation.

                                 

                                Take a look at the processCoreQueues method in the parser in the messaging subsystem add operation to see what I am talking about with a macro approach.

                                Ok, i will take a look

                                 

                                I need to correct something I said about incremental operations being preferred to macro ones. The issue is that compensating updates for REMOVE are easier if they are macro operations. Compensating a remove with a build-up style approach means one remove becomes say 20 operations to undo.

                                 

                                 

                                Well there is nothing from either the messaging or jms subsystem that is used by either outgoing RA managed factories or incoming configuration. I can do it either way, both configs will look very similar, it will just be surrounded by an extra <resource-adaptor> element if part of the messaging sub system (or should it be part of the jms subsystem).

                                What I am getting at is that if you look at it from a user perspective about what they have to add to use a JMS queue in the system.

                                 

                                They must

                                1. Define a jms config specifying the connection factories and jndi names
                                2. Define a client config (resource adapter) in a separate subsystem or separate block specifying largely the same information, but with some additional parameters

                                 

                                Ultimately I think the user wants to just say here is my jms queue, and then inject it and go. So just looking for ways we can make it easy to use, at least for the common cases. Maybe we can talk about it on the call.

                                • 43. Re: Resource Adapter integration on AS7
                                  ataylor
                                  How about we do a conference call tomorrow to discuss this stuff? What times work for you guys?

                                  Well i am on pto from about 4 uk time today, so unless we have it round 3 uk time, it will have to wait until friday.

                                   

                                  What I am getting at is that if you look at it from a user perspective about what they have to add to use a JMS queue in the system.

                                   

                                  They must

                                  1. Define a jms config specifying the connection factories and jndi names
                                  2. Define a client config (resource adapter) in a separate subsystem or separate block specifying largely the same information, but with some additional parameters

                                   

                                  Ultimately I think the user wants to just say here is my jms queue, and then inject it and go. So just looking for ways we can make it easy to use, at least for the common cases. Maybe we can talk about it on the call.

                                  I dont think theinformation is the same, yes some properties will be the same however it won't reference anything else in the messaging or jms subsytem. There will be 2 main configs, outgoing connectors that we will map on to 'HornetQRAManagedConnectionFactory' and a ResourceAdaptor itself which will also have connection factory type properties.

                                  • 44. Re: Resource Adapter integration on AS7
                                    jason.greene

                                    Andy Taylor wrote:

                                     

                                    How about we do a conference call tomorrow to discuss this stuff? What times work for you guys?

                                    Well i am on pto from about 4 uk time today, so unless we have it round 3 uk time, it will have to wait until friday.

                                     

                                     

                                    We can do 3 if you can. Ping me on IRC if it works out. Otherwise no big deal we can chat later.

                                     

                                     

                                    Andy Taylor wrote:

                                    I dont think theinformation is the same, yes some properties will be the same however it won't reference anything else in the messaging or jms subsytem. There will be 2 main configs, outgoing connectors that we will map on to 'HornetQRAManagedConnectionFactory' and a ResourceAdaptor itself which will also have connection factory type properties.

                                     

                                    Take a look at glassfish for example. They only require that you configure a destination and a connection factory.