Is DemoRemote annotated w/ @Remote?
(Stab in the dark)
This has always worked for me...
Yup, it was annotated with @Remote
I finally found the problem by everybody's favourite trial and error approach. I'll state the solution here to save troubles to people with similar problems.
What I had was the following file structure:
ear file: +-myear.ear | +-META-INF | +-Demo.jar standalon war file: +-DemoWeb.war | +-WEB-INF | +-lib | +-Demo.jar
Note Demo.jar is deployed twice, once in the ear and again in the war. This was making the @RemoteBinding annotation being ignored. I don't know why, because i thought jars in WEB-INF/lib aren't being deployed even if they contain ejbs, but perhaps I am wrong.
when I repacked it all to one EAR (and removed the redundand Demo.jar from WEB-INF/lib) it started working
+-myear.ear | +-META-INF | +-Demo.jar | +-DemoWeb.war