• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XPost: How to specify a simple JNDI name for my EJB in WebLogic 10 (with annotations)?

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a crosspost from the EJB forum.

If I annotate my session bean like that:

and deploy it in Webglogic 10, i get access to the remote interface with:


that works fine, but is there an alternative to define
a jndi name with annotations, without the full qualified classname of the remote interface?

so I want to have something like:


Reason being that at runtime, the client will need to be able to get the service out of JNDI without actually knowing the implementation (in this case, MyServiceBeanImpl or a Proxy) that is being returned (and hence the FQCN).

Google and friends seems to indicate that there may be a way to do this using ejb-jar.xml or weblogic-ejb-jar.xml, but So far it all looks like a cross between undocumented and incomprehensible. I'd rather do this with straight annotations, but I'm open to XML examples, if anyone's got 'em.

thanks!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apart from using the Lookup; you need to configure weblogic-ejb-jar like below::


<wls:weblogic-enterprise-bean>
<wls:ejb-name>CalculatorBean</wls:ejb-name>
<wls:stateless-session-descriptor>
<wls:business-interface-jndi-name-map>
<wls:business-remote>info.pkmondal.ejbs.CalculatorRemote</wls:business-remote>
<wls:jndi-name>calculator</wls:jndi-name>
</wls:business-interface-jndi-name-map>
</wls:stateless-session-descriptor>
</wls:weblogic-enterprise-bean>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic