WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  EJB3 custom JNDI Binding Name with Websphere

    Posted Tue July 30, 2024 01:26 PM

    I have an application which I am migrating an application(EJB Application to be specific) to EJB 3.1 from EJB 2.1.

    Now, I want a custom JNDI mapping for a Stateless bean. I had set the mappingName with the Stateless Annotation, but it only sets the mapped-name XML Tag in the ejb-jar_merged.xml file.

    Now, I want to set the following simple-binding-name programatically, probably via using the EJB3.1 Annotations. Is that possible to do so?

    I except the following, ibm-ejb-jar-bnd.xml to look this way(Potentially without creating this file manually).

    <session name="SomeEJBBean" simple-binding-name="ejb/org.abc.ejbclient.SomeEJBBean"/>

    Any help is greatly appreciated.



    ------------------------------
    Rohit
    ------------------------------


  • 2.  RE: EJB3 custom JNDI Binding Name with Websphere

    Posted Mon August 05, 2024 03:22 AM

    It sound like you want to do

    @EJB(name="myEJB")

    You can also try lookup = "MyEJB"

    Brian



    ------------------------------
    Brian S Paskin
    Sr. Technology Engineer
    IBM Cloud Engineering
    ------------------------------