Dan OConnor wrote:
>
> On 18 May 00, at 8:09, marc fleury wrote:
>
> > >
> > > > Can I make a context.lookup("java:comp/env/jdbc/DBMS") ?
> > >
> > > For the above datasource you can use context.lookup("jdbc/DBMS").
> > > However, this isn't portable. You should make a ResourceReference in
> > > your bean descriptor that maps "jdbc/DBMS" in your EJB environment (the
> > > one you show above) to "jdbc/DBMS" in the global JNDI tree. That way
> >
Mapping to the global JNDI tree from the java: is on the container.
Again look at ContainerMetaData.java in jBoss 1.0
marc
> > I am not sure I agree there chief.
> >
> > This must be done automatically otherwise we create non-compliance with
> > the spec (it does say it is the container responsability to provide
> > this) and more XML madness for our users. Check out the way it is done
> > in jBoss 1.0 we check on the type (here your MLET thingy?) and provide
> > the entry both in java:comp/env and java:comp/env/jdbc.
> >
> > Somewhere in ContainerMetaData.java
> >
> > marc
>
> Hi Marc,
>
> If I understand what you are saying, I think Rickard is correct. It is
> the deployer's responsibility, not the container's, to map the
> resource reference to an actual resource in the global namespace.
> See 14.4.2.
>
> The container provider's responsibility is to provide a tool that will
> allow this mapping to occur. The "tool" could be an XML file that
> they can edit by hand, or something more user friendly to avoid
> "XML madness."
>
> This provides a level of indirection between the reference that the
> bean uses, and the actual server configuration. This could be an
> important benefit if, for example, you were deploying a lot of third
> party beans. Say, hypothetically, if you were hosting other
> people's EJB applications.
>
> You could provide a convenience option to skip this level of
> indirection, and simply assume that the name the bean uses is the
> name in the global namespace. You could even optionally assume
> that, if only one datasource is configured, every name maps to this
> datasource. But these are options. Compliance == indirection.
> Resistance is futile.
>
> -Dan
>
> >
> >
> > > your beans are more portable, cause you are allowed to
> change the name
> > > "jdbc/DBMS" in the globa� tree without breaking your beans.
> > >
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]