You can set what your lookup will be via an comp/env variable in your bean's
deployment descriptor.
For example
InitialContext jndi_context= new IntialContext();
String cfURL = (String)
jndi_context.lookup("java:comp/env/ConnectionFactoryURL");
QueueConnectionFactory qFactory =
(QueueConnectionFactory)ctx.lookup(cfURL);
Then in your ejb-jar.xml you'd have a stanza like this:
<env-entry>
<env-entry-name>ConnectionFactoryURL</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>serial://jms/qcf</env-entry-value>
</env-entry>
You can just change the value and rejar the bean before you deploy to a
different app server.
Dustin
> -----Original Message-----
> From: Mokas Vassilis ([EMAIL PROTECTED])
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 3:06 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] Queue Connection Factory - lookup
>
>
> Hi all,
>
> I have a session EJB and a Message-Driven EJB in a jar
> deployed in Borland
> Enterprise Server.
>
> In a method of the Session Bean there is a lookup for the
> queue connection
> factory in BES:
>
> QueueConnectionFactory qFactory =
> (QueueConnectionFactory)ctx.lookup("serial://jms/qcf");
>
>
> However, if I deploy the same jar in JBoss there will be an
> NamingNotFound
> exception in the above line.
>
> How is is possible to change only the deployments descriptors (without
> changing the code!) in order to
> map "serial://jms/qcf" (BES) to "ConnectionFactory" (JBOSS)
> and deploy the
> jar in JBOSS ?
>
> I am currently using xDoclet tags for the development of my EJBs.
>
> Thanks
> Vassilis
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user