On 22 Aug 00, at 8:27, Rickard �berg wrote:
> Hi!
>
> Dan OConnor wrote:
> > There can be more than one deployment of an EJB component with
> > the same class names. There are many reasons that this might
> > occur. Some of the possibilities: environment entries are different;
> > links to resources or other EJBs are different; proprietary
> > information (e.g. "read-only" status and caching strategy for entity
> > beans) is different.
>
> Yup yup, and I would guess that another common one will be to use
> several distribution protocols for the same bean.
Hi Rickard,
The example of multiple distribution protocols is interesting and not
immediately obvious to me. I think I could make a case that a
single deployment of an EJB should be able to have multiple
distribution protocols. The basic argument is that the distribution
strategy is independent of the business logic (in much the same
way that a view is independent of a model in MVC).
Let me make the case by example. Say that you have two
distribution protocols for an entity bean. If our application has
exclusive access to the database, wouldn't it be reasonable to use
the same cached entity instance for an access via either protocol?
This would only be possible if the component had a one-to-many
relationship with distribution protocols. (Note that this is different
from the situation where a resource or environment entry is
different; the EJB container could not reuse a cached instance,
because it would behave differently based on its corresponding
deployment parameters.)
For what it's worth, it also seems more intuitive (to me) for a
deployer to list the appropriate distribution protocols for an EJB,
rather than redeploy the component for every distribution protocol
he or she might add.
-Dan
>
> > There is a one-to-many relationship between class names and
> > JNDI names to support multiple deployments.
>
> Eeeeexactly.
>
> /Rickard
>
> --
> Rickard �berg
>
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>