David,

It works if you annotate the bean class as @Remote({CounterRemote.class}). However, if you just use @Remote (without class) it does not work.

Thanks,

Raj
David Blevins wrote:

On Dec 27, 2006, at 8:56 PM, Mohammad Nour El-Din wrote:

I have found the reason of the problem, but I can't explain the details now, cause I am at work and I want to catch the bus, but I've attached your code with the changes I made to make it work, take a look at it and wait for my detailed explanation when I get back home :)

I'm confused, I tried the shopping-cart example and it ran just fine with no issues.

I also updated the existing 'counter-stateful-pojo' example as follows (see below) and it ran just fine too.

-David

Index: src/main/java/org/apache/openejb/examples/counter/CounterImpl.java
===================================================================
--- src/main/java/org/apache/openejb/examples/counter/CounterImpl.java (revision 490656) +++ src/main/java/org/apache/openejb/examples/counter/CounterImpl.java (working copy)
@@ -17,6 +17,8 @@
package org.apache.openejb.examples.counter;
import javax.ejb.Stateful;
+import javax.ejb.Remote;
+import javax.ejb.Local;
/**
  * This is an EJB 3 style pojo stateful session bean
@@ -26,6 +28,8 @@
  * interface, and CounterLocal, a local business interface
  */
@Stateful
[EMAIL PROTECTED]({CounterRemote.class})
[EMAIL PROTECTED]({CounterLocal.class})
public class CounterImpl implements CounterLocal, CounterRemote {
     private int count = 0;
Index: src/main/java/org/apache/openejb/examples/counter/CounterRemote.java
===================================================================
--- src/main/java/org/apache/openejb/examples/counter/CounterRemote.java (revision 490656) +++ src/main/java/org/apache/openejb/examples/counter/CounterRemote.java (working copy)
@@ -23,7 +23,6 @@
  * A remote business interface must be annotated with the @Remote
  * annotation
  */
[EMAIL PROTECTED]
public interface CounterRemote {
     public int increment();



Reply via email to