You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by "Peter L. Berghold" <pe...@berghold.net> on 2008/06/03 20:46:15 UTC

SImple stupid EJB example?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is there somewhere a simple/stupid example of an EJB application that
runs under Geronimo/Tomcat somewhere that I can dissect?

Having a rough time getting this to work and I know it is no doubt my
lack of experience with EJB...

- --
Peter L. Berghold                       Unix Professional
Peter@Berghold.Net       AIM: redcowdawg YIM: blue_cowdawg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIRZF3UM9/01RIhaARAlUXAJ4strCJFD5qJrOEFt4tHqrDPWUAHQCfQCE/
tZVL9DZwVbmpXaDOAqqQOAg=
=rkhP
-----END PGP SIGNATURE-----

Re: SImple stupid EJB example?

Posted by David Blevins <da...@visi.com>.
On Jun 3, 2008, at 11:53 AM, Peter L. Berghold wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Viet Nguyen wrote:
>> I suggest you look at this sample
>>
>>
>
> Thanks! That's exactly the sort of thing I was looking for.

Also, if you're new to EJB I'd recommend setting up some test cases  
using the Geronimo EJB container.  It'll allow you to know if you're  
getting things right from a spec compliance perspective in plain unit  
tests.

Here's another example that shows unit testing:

   http://openejb.apache.org/3.0/simple-stateless-example.html

To get more teacher/student style descriptions of compliance issues,  
alter your setup method from the one shown on that page to this:

    protected void setUp() throws Exception {
        Properties properties = new Properties();
        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,  
"org.apache.openejb.client.LocalInitialContextFactory");
        properties.setProperty("openejb.validation.output.level",  
"VERBOSE"); // this increases the validation output

        initialContext = new InitialContext(properties);
    }


Hope this helps!

-David


Re: SImple stupid EJB example?

Posted by "Peter L. Berghold" <pe...@berghold.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Viet Nguyen wrote:
> I suggest you look at this sample
> 
>

Thanks! That's exactly the sort of thing I was looking for.



- --
Peter L. Berghold                       Unix Professional
Peter@Berghold.Net       AIM: redcowdawg YIM: blue_cowdawg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIRZM+UM9/01RIhaARArIvAJ0XbCUXl9/iiQpTP5gf5X0LQPl2CwCfd9g8
ORq7Uv3uEgerJFzaG+VhWt4=
=HpiE
-----END PGP SIGNATURE-----

Re: SImple stupid EJB example?

Posted by Viet Nguyen <vh...@gmail.com>.
I suggest you look at this sample

http://cwiki.apache.org/GMOxDOC21/mytime-very-simple-session-ejb-example.html

or if you like, this one too

http://cwiki.apache.org/GMOxDOC21/myphonebook-very-simple-entity-ejb-example.html

Thanks,
Viet