users@glassfish.java.net

Wanted! WebService-tutorial , EJB 3.0, Glassfish + MySQL

From: <glassfish_at_javadesktop.org>
Date: Sat, 20 Oct 2007 14:45:08 PDT

Hello,

Hopefully there are some of you out there using the mysql-rdbms.
I am using EJB 3.0 here with Glassfish.

I am able to write a WebService with a couple of methods,
that I am able to test from within Glassfish.
This works fine.

I am having trouble, though, when fetching data from my mysql-rdbms.
Let say that I have one table, PROJECTS, and one entity-class, Project.
The table is simple, the columns are ;
id, int - which is my pk.
title, char(30).

From the WebService-Stateless-bean I want to fetch data from my table
via my Entity using the EntityManager.
Here I have problems .....
I am using persistence.xml for setting up my JNDI and I am using the Glassfish resource.xml to set up my database.

I am able to ping my database from within glassfish.
I am able to fetch stuff from 'helper'-class which are not 'Entity'.

So my trouble seems to be Enity and the database.

Is anyone out there how is competent within EJB 3.0, who
can write a quick and snappy tutorial for this ?

Regards, iner
[Message sent by forum member 'inkimar' (inkimar)]

http://forums.java.net/jive/thread.jspa?messageID=241372