Tim,
thanks a lot for your kind help. In fact, it works pretty well using
your tips. :-)
But I do have another question and I would be very glad if your could
answer that too:
AFAIK since EJB 3.0 remote interfaces are optional. Is there a standard
compliant way to tell GlassFish that the remote interface shall just be
the class itself (without defining an extra interface)? I tried adding
@Remote directly to the stateless session bean itself, but that did not
work at runtime. Does that mean, when using a client application I
always have to explicitely define the remote interface and there is no
way to annotate that GlassFish shall internally create the remote
interface for me?
Thanks a lot for your kind help!
Markus
glassfish_at_javadesktop.org schrieb:
> Hi, Markus.
>
> Although I do not have exactly the same software running on my system that you have, I was able to reproduce exactly the same problem with your code.
>
> Because the client will be remote from the EJB module at runtime, the EJB module needs to define the remote interface for the SLSB and the client needs to refer to that remote interface.
>
> For example, I added this to the EJB module:
>
> @Remote
> public interface StatisticsServerRemote {
>
> double average(final double x, final double y);
> }
>
> and changed the SLSB implementation to implement this remote I/F:
>
> public class StatisticsServer [b]implements StatisticsServerRemote[/b]
>
> Then I changed the client to use this:
>
> @EJB
> private static StatisticsServer[b]Remote[/b] statisticsServer;
>
> With those changes your example worked for me.
>
> Can you try this and let us know if this resolves the problem?
>
> - Tim
> [Message sent by forum member 'tjquinn' (tjquinn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=265362
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
--
http://www.xing.com/go/invita/58469