8 Replies Latest reply on May 28, 2014 11:18 AM by robert.geisler

    custom bean-instance-pools?

    robert.geisler Newbie

      hi everbody,

       

      today i have a simple question:
      are custom bean-instance-pools supported in JBoss 7?

       

      as i found out so far, just strict-max-pool is available.
      what about JBoss 4.2.2 ThreadLocalPool?
      are custom implementations planned for later releases?

       

      i implemented a custom bean instance pool for JBoss 4.2.2 (https://community.jboss.org/message/626608#626608) some days ago.
      now we would like to support it in JBoss 7, too, but i think this is not possible today!?

       

      greets
      robert

        • 2. Re: custom bean-instance-pools?
          robert.geisler Newbie

          hi nicklas,

           

          thank you for your response.

           

          as i understand, it is possible to configure an EJB Pool for EJBs by referencing the pool (in annotation or deployment descriptor). thats fine so far.
          but what about defining custom pools? as i see in jboss-as-ejb3_1_2.xsd and in EJB3Subsystem12Parser.java only element <strict-max-pool> is allowed under <pools><bean-instance-pools>.

           

          <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

              ...

              <pools>

                  <bean-instance-pools>

                      <strict-max-pool name="a-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                      ...

                  </bean-instance-pools>

              </pools>

              ...

          </subsystem>

           

          for a custom pool implementation i would like to set

           

          <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

              ...

              <pools>

                  <bean-instance-pools>

                      <my-custom-pool name="my-custom-pool" class="my.custom.pool.Pool" ..."/>

                      ...

                  </bean-instance-pools>

              </pools>

              ...

          </subsystem>

           

          but this currently causes a javax.xml.stream.XMLStreamException: ParseError at [...] Message: JBAS014789: Unexpected element '{urn:jboss:domain:ejb3:1.2}my-custom-pool' encountered .

           

          that is why i asked: are custom pools planned for later releases?

           

          regards

          robert

          • 3. Re: custom bean-instance-pools?
            Nicklas Karlsson Master

            You can always file a feature request for it. The ejb subsystem code in general appear to support this with the Pool<T> interface but the current implementation is a bit tied to the StrictMaxPool/StrictMaxPoolConfig

            • 4. Re: custom bean-instance-pools?
              jaikiran pai Master

              We could probably add that although the thing to remember is that such implementations will most likely come from deployment modules (although it's possible to use static module too). Although, looking at that other thread, I think a more reasonable way would be to just introduce support for that specific pool implementation that you have. Would you be interested in porting that implementation of yours to AS7 (including adding support via the EJB3 subsystem xsd)?

              1 of 1 people found this helpful
              • 5. Re: custom bean-instance-pools?
                robert.geisler Newbie

                jaikiran pai schrieb:

                 

                Would you be interested in porting that implementation of yours to AS7 (including adding support via the EJB3 subsystem xsd)?

                of course i am interested! what are the steps that need to be done for that?

                 

                i am allowed to publish the source code of our implementation
                and i could provide the pool implementation for JBoss7 within the next few days.

                 

                but i am not a committer, so someone of you has to put that all together : )

                 

                regards

                robert

                • 6. Re: custom bean-instance-pools?
                  Nicklas Karlsson Master

                  Actually, the procedure for a AS dev and a complete outsider is quite similar (check https://community.jboss.org/wiki/HackingOnAS7). There is a small number of people that actually merge pull requests.

                  • 7. Re: custom bean-instance-pools?
                    Mandar Kulkarni Newbie

                    Hi Robert,

                     

                    I have exactly the same requirement as yours. Did you manage to plug-in your pool implementation with JBoss 7 ?

                    • 8. Re: custom bean-instance-pools?
                      robert.geisler Newbie

                      hi mandar,

                       

                      i did not, yet, because i had no time for this topic recently.
                      but currently i asked the same question again for EAP 6 and WildFly 8.

                       

                      did you, mandar, make any progress on this in the meantime?

                       

                      regards
                      robert