On Jan 23, 2007, at 5:22 PM, Jeff Genender wrote:
Any thoughts on a Clustered annotation for openejb? I need to
know, (or
any clustering solution) needs to know, which session beans need to
get
clustered...and an annotation and a flag/attribute on a per bean basis
in the openejb-jar.xml would probably be appropriate. Thoughts?
That's certainly something we can do at some point.
For the here and now, there is already a general solution for this.
You can have as many containers as you want (including none at all),
each having it's own QoSs (such as clustering or not clustering) and
each bean can say which container it wants in it's openejb-jar.xml.
I.e.
<Container id="Default Stateful Container" ctype="STATEFUL">
TimeOut 20
PoolSize 100
BulkPassivate 50
</Container>
<Container id="Default Stateful Container" ctype="STATEFUL">
InstanceManager
org.apache.openejb.core.stateful.ClusteredInstanceManager
# any other properties you want
</Container>
then in your openejb-jar.xml
<ejb-deployment ejb-name="FooBean" deployment-id="Foo" container-
id="Default Stateful Container"/>
<ejb-deployment ejb-name="BarBean" deployment-id="Bar" container-
id="Clustered Stateful Container"/>
<ejb-deployment ejb-name="BazBean" deployment-id="Baz" container-
id="Clustered Stateful Container"/>
The BarBean and BazBean would get deployed into the Clustered
Stateful Container and receive any QoSs that that container provides
(clustering and anything else it wants) and the FooBean would go into
the Default Stateful Container and not be clustered.
You can do this exact thing via the Geronimo plan files. One plan
can add the default containers (if you want them) and you can have an
entirely different plan add clusterable containers. And some other
plan in the future can add an even different set of containers if it
chooses and people will be able to deploy into them getting their QoSs.
-David