On Mar 12, 2008, at 7:58 PM, Karan Malhi wrote:

Was just trying out something. I created a simple interface and annotated it
with @Stateless.  I also created a separate class (no relation to the
interface) and annotated the class with @Stateless. Both of these are shown below. Then I compiled them and put them in a jar (test.jar) and deployed the jar. OpenEJB displays them as EJB's without a JNDI name. Is this the
correct behaviour? Also I started openejb using the following command
,expecting to see the ejb-jar.xml flushed out somewhere, but did not find
the xml file. What am i doing wrong here?

openejb start -Dopenejb.descriptors.output=true &

Check your openejb.log for a line that says where the xml was output.


The use of @Stateless on an interface doesn't work -- the bean class needs to be a class. We clearly don't validate that, we should. The other is you don't have any interfaces, so nothing bound to JNDI. We should validate that too.

As long as we're respinning, I'll throw both of those checks in.

-David


Here is what happens when i deploy the jar

[EMAIL PROTECTED]:~/projects/temp/openejb$ openejb deploy test.jar
Application deployed successfully at "test.jar"
App(id=/home/karan/projects/oss/openejb3/assembly/openejb-standalone/ target/openejb-
3.0-SNAPSHOT/apps/test.jar)
   EjbJar(id=test.jar,
path=/home/karan/projects/oss/openejb3/assembly/openejb-standalone/ target/openejb-
3.0-SNAPSHOT/apps/test.jar)
       Ejb(ejb-name=Car, id=Car)

       Ejb(ejb-name=CalculatorImpl, id=CalculatorImpl)


[EMAIL PROTECTED]:~/projects/temp/openejb$ cat Car.java
package com.lq;

import javax.ejb.Stateless;

@Stateless
public interface Car{
       public void start();
}
[EMAIL PROTECTED]:~/projects/temp/openejb$ cat CalculatorImpl.java
package com.lq;

import javax.ejb.Stateless;

@Stateless
public class CalculatorImpl{
       public double add(double x, double y){
               return x+y;
       }
}


--
Karan Singh Malhi

Reply via email to