Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Got an IllegalStateException during a loopback in Singleton  RSS feed

 
Himai Minh
Ranch Hand
Posts: 1514
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a singleton, that makes a direct loopback method call via SessionContext.getBuinsessObject. It works:


But when I tried to make the indirect loopback call via another Singleton, instead of getting an IllegalLoopBackException, I got an illegalStateException:



Caused by: java.lang.IllegalStateException: Invalid business interface : interface com.ivan.scbcd6.SLSBALocal for ejb SLSBB
at com.sun.ejb.containers.AbstractSessionContextImpl.getBusinessObject(AbstractSessionContextImpl.java:202)
at com.ivan.scbcd6.SLSBB.method2(SLSBB.java:17)

 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2921
205
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You didn't have an indirect loopback call from the SLSBB bean. You should inject SLSBA inside SLSBB and call from SLSBB.method2() another method on (the injected) SLSBA (e.g. method3).
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!