Passing method parameters from EJB3 to EJB2 is not happening

164 Views Asked by At

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.

1

There are 1 best solutions below

2
On BEST ANSWER

is withSomeparameter a Serializable type?

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