My oversight! Yes. You might as well use an environmental variable. But most organizations drive applications from a config cache that store application variables. Just a practice and its definitely easier to manage... rather than editing config files across multiple machines! So yes, you could use it but in a real deployment scenarios won't we want to centralize maintanence of the config values. Since the t3 protocol is a weblogic thingey, the protocol for jboss would just be java: and the complete url be java:comp/env/ejb/<ejb_name_to_lookup>. Vinay
----- Original Message ----- From: Steve Swing Sent: Tuesday, May 01, 2001 10:28 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] It never finds beans in another *.jar's
Could you use an environment entry?
<env-entry> <env-entry-name>ReallyRemoteBean</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>t3://otherserver/application/beanB</env-entry-value> </env-entry>
// this could be done one time and cached // I'm not certain if you need the java:comp/ prefix here String jndiName := (String)ctx.lookup("java:comp/env/ReallyRemoteBean");
BHome home = (BHome)ctx.lookup(jndiName); B bean = home.create(pk);
You're doing two lookups but at least you don't have to change code. The environment entry name is hard coded instead. This is an alternative to Vinay's acceptable solution. The advantage here is the jndi name isn't in a separate properties file that must also be edited, deployed, & managed. It's in the DD where Bean B is hosted and the DD (in two or more elements) for each client of Bean B.
My $1/50.
Steve
----- Original Message ----- From: Vinay Menon To: JBOSS Sent: Tuesday, May 01, 2001 4:02 pm Subject: Re: [JBoss-user] It never finds beans in another *.jar's
Have had quite a few chaps usually put the jndi names in something as simple as a resource bundle/properties file. Then it wouldn't need a recompile of code.... an option you might want to try? However, I must add that it is recommended by folks at jboss that ejbs that are referenced by one another be bundled together in a single jar.......
Your views?
Vinay
----- Original Message ----- From: Guy Rouillier Sent: Tuesday, May 01, 2001 8:07 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] It never finds beans in another *.jar's
I'm going to be doing this in the near future, so I took a look at the docs. It said to use a jndi-name like this:
<jndi-name>t3://otherserver/application/beanB</jndi-name>
If I understand this correctly, the JNDI name is the name we use in the ctx.lookup() call. With the above, a lookup for an external EJB on the same JBoss is different from a lookup for the same EJB on a different JBoss. Wouldn't that require a source code change? That would not be good. ----- Original Message ----- From: Vinay Menon To: JBOSS Sent: Sunday, April 29, 2001 11:47 AM Subject: Re: [JBoss-user] It never finds beans in another *.jar's
Hi, Check out the section 'External EJB Reference' in chapter 6 in the online documentation for jboss at www.jboss.org\documentation\HTML\ch06s05.html
Vinay
_______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
|