0

I'm sure I'm missunderstanding something, but here goes. I have an app with a variety of stateless beans which each implement a remote and a local interface. The interfaces are annotated with @Remote & @Local respectively. This works fine for all beans which get their "own" interface, but three use the same one as a view.

@Stateless
@PermitAll
@SecurityDomain("security-policy")
public class ReportBean extends ComplexBusinessObjectBean<IBusinessObject> implements IBusinessObjectMgmt<IBusinessObject>, IBusinessObjectMgmtLocal<IBusinessObject> 
@Stateless
@PermitAll
@SecurityDomain("security-policy")
@Interceptors({InvocationInterceptor.class})
public class ComplexBusinessObjectBean<T extends IBusinessObject> extends SimpleBusinessObjectBean<T> implements IBusinessObjectMgmt<T>,IBusinessObjectMgmtLocal<T>
@Stateless
@PermitAll
@SecurityDomain("security-policy")
@Interceptors({InvocationInterceptor.class})
public class SimpleBusinessObjectBean<T extends IBusinessObject> implements IBusinessObjectMgmt<T>,IBusinessObjectMgmtLocal<T> {

If i now try to deploy these to wildfly I get an java.lang.IllegalArgumentException: WFLYEE0047: Incompatible conflicting binding Error.

If I remove the implements from two of them it deploys fine, but the client will fail since there'll be no "ejb:..." binding for the respective beans and give a "Report EJB is not a remote View" Error

I tried adding a name attribute to the @Stateless and a @EJB(name,beanInterfacce,beanName) annotation, neither solved the Problem.

It is my understanding that i could copy the interface and just make two more, eg: interface1,2,3 but I'm sure there has to be a different way to do it, right?

This 8 year old answer says it should just work if I'm not misreading it. I tried the linked solutions.

derYak
  • 1
  • 3
  • This was partially solved by a classic: "Have you tried turning it off and on again." I had to undeploy the old version and restart the wildfly instance, this got rid of most errors. I'm going to leave this up in case someone needs the reminder. – derYak Jul 13 '23 at 13:29

0 Answers0