On Tue, May 15, 2001 at 06:13:18PM -0400, Alexander Kogan wrote:
> Hi,
>
> Toby Allsopp wrote:
> >
> > I didn't realise that the situation was calling from an EJB; I thought we
> > were talking about application clients. Come to think of it, the same
> > probably applies to J2EE Application Clients.
>
> I think so. Even web-apps (servlets, JSPs) are supposed to use java:env
> namespace and have "deployment" descriptors.
>
> > Why not declare this as an ejb-ref in the deployment descriptor? Something
> > like:
> >
> > <ejb-ref>
> > <ejb-ref-name>ejb/Foo</ejb-ref-name>
> > <ejb-ref-type>Session</ejb-ref-type>
> > <home>javax.ejb.EJBHome</home>
> > <remote>com.foo.FooBaseInterface</remote>
> > </ejb-ref>
>
> Ok, two things here. First, what if I have to look for
> several "hot-deployed" beans. I mean "several" and I
> don't know exactly how many. Second, their jndi-names.
> jndi-names are runtime parameters in my case.
Yes, in the more dynamic case, where you are discovering the other beans
at runtime, this won't apply. I can't personally think of a good reason
for doing this off the top of my head, but there's no reason not to just
use plain JNDI names in that case, IMO.
> BTW, your idea is very interesting, especially
> in case of predefined names. I'm not sure that
> it works, but... At least, I'll think about that.
I don't know if it will work either. If you need to make these decisions
at runtime rather than at deployment time then the deployment descriptor
is probably not the best mechanism and the spec be damned.
Toby.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user