Thanks,
Just trying to break things on purpose to see the validation messages. I
tried the same example after you made changes and it works fine, I get a
ValidationException. One thing though, when I start the server, the OpenEJB
version is showing up as 3.1 (see below). Shouldn't this be 3.0 ?
Apache OpenEJB 3.1-SNAPSHOT build: 20080313-07:18
Secondly, after my application failed validation, I tried to deploy the app
again, this time I used the -d flag to see a detailed validation summary.
However, the commandline tool reported back that the application is already
deployed. Looks like when we first deploy it, it copies the jar to the apps
directory and if validation fails, it does not remove the jar. When we try
to redeploy it, it finds the jar in there and just quiety returns the
message that the app is deployed. If we can copy the jar to the apps
directory after it passes validation, that would probably resolve the issue.
Below is the output after I try to deploy it again:
[EMAIL PROTECTED]:~/projects/temp/openejb$ openejb deploy -d test.jar
Application already deployed at
"/home/karan/projects/oss/openejb3/assembly/openejb-standalone/target/openejb-
3.1-SNAPSHOT/apps/test.jar"
On Thu, Mar 13, 2008 at 12:13 AM, David Blevins <[EMAIL PROTECTED]>
wrote:
>
> 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
>
>
--
Karan Singh Malhi