简体   繁体   中英

Passing method parameters from EJB3 to EJB2 is not happening

I have EJB3 and EJB2 bean. I am calling a method which is there in EJB2 from EJB3 bean.

Below is the code in EJB3 bean.

private EJB2ServiceRemote getEJB2Bean() {
    if (EJB2ServiceRemote == null) {
      EJBHomeAttributes EJB2Service =
          new EJBHomeAttributes("ejb/business/payments/EJB2Service", EJB2ServiceRemoteHome.class.getName());
      EJB2ServiceRemote = (EJB2ServiceRemote) EJBServices.getRemoteService(EJB2Service);
    }
    return EJB2ServiceRemote;
  }



String result = getEJB2Bean().callMethodInEJB2(withSomeParameter);

My problem is withSomeParameter is going as null in callMethodInEJB2 in EJB2 Bean.

I am using Websphere 7 application server.

is withSomeparameter a Serializable type?

if not, you cannot send it to a Remote EJB call, it has to be a serializable type.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM