2 Replies Latest reply on May 10, 2006 11:43 AM by lizmstanley

    Overriding annotation partition name

    klbcolt

      Hi, I've found documentation (see below) that states that passing in a property at jboss startup will change the default partition name. However, this does not seem to override the default partion name used in the @Clustered annotation. Is this a bug? In any case, how can this default partition name used by the annotation be overridden so that the stateless session bean can be used in multiple clusters. Thanks! Kevin

      "In order for nodes to form a cluster, they must have the exact same PartitionName and the ParitionConfig elements. Changes in either element on some but not all nodes would cause the cluster to split. It is generally easier to change the ParitionConfig (i.e., the address/port) to run multiple cluster rather than changing the PartitionName due to the mulititude of places the former needs to be changed in other configuration files. However, changing the PartitionName is made easier in 4.0.2+ due to the use of the ${jboss.partition.name} property which allows the name to be change via a single jboss.partition.name system property"

        • 1. Re: Overriding annotation partition name
          brian.stansberry

          I've created a JIRA issue for this. See http://jira.jboss.com/jira/browse/EJBTHREE-424. Thanks for reporting it.

          • 2. Re: Overriding annotation partition name
            lizmstanley

            Actually I have a related issue, just wanted to comment in case anyone else is experiencing the same thing. I am not using the @Clustered annotation at all in order to avoid specifying app server specific information (such as partition name) inside the code. I'd rather put that in a deployment descriptor, so I tried including a jboss.xml with a partition called cluster1. Theoretically I should be able to use a combination of deployment descriptors and annotations. However even though the annotation is not there, it is still causing this error upon deployment:

            javax.naming.NameNotFoundException: DefaultPartition not bound


            When I put the annotation back in the bean,
            @Clustered (partition="cluster1")
            then the deployment is successful.