1 Reply Latest reply on Dec 14, 2008 4:42 AM by emuckenhuber

    Clustered/Non-clustered config for SFSB's

    asookazian

      In clustered Seam apps, it is required to add the tag to the web.xml as well as @Clustered to each SFSB.

      That is fine when deploying your "clusterized" app to a clustered environment (e.g. 2 node horz cluster).

      Our dev envmts are not clustered. How can we configure our apps so that we can deploy to both a clustered and non-clustered envmt w/o changing the code?

      It's possible to pass in a param using -D when starting JBoss with run.bat but won't we have to moving the annotations from the classes to metadata in jboss.xml or ejb-jar.xml?

      References:

      https://jira.jboss.org/jira/browse/EJBTHREE-810

      http://docs.jboss.org/ejb3/embedded/api/org/jboss/annotation/ejb/Clustered.html

      http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Clustering_Guide/5/pdf/Clustering_Guide.pdf

        • 1. Re: Clustered/Non-clustered config for SFSB's
          emuckenhuber

           

          "asookazian" wrote:

          It's possible to pass in a param using -D when starting JBoss with run.bat but won't we have to moving the annotations from the classes to metadata in jboss.xml or ejb-jar.xml?


          Hmm that could work. So if i understood you correctly you want to pass a System property e.g. my.app.clustered

          And then define the clustered property in jboss.xml like:

           <enterprise-beans>
           <session>
           <ejb-name>TestBean</ejb-name>
           <home-jndi-name>TestBeanHomeJndiName</home-jndi-name>
           <local-home-jndi-name>TestBeanLocalHomeJndiName</local-home-jndi-name>
           <clustered>${my.app.clustered}</clustered>
           </session>
           </enterprise-beans>
          


          Although i'm not sure if this will work without problems :)
          Otherwise you could create a jboss.xml descriptor for your dev environments,
          where you override the annotations by setting clustered=false.