users@glassfish.java.net

Embeddable Container - glassfish-embedded-static-shell (3.1.2.1-SNAPSHOT)

From: <forums_at_java.net>
Date: Wed, 10 Oct 2012 06:33:24 -0500 (CDT)

Hi, I am attempting to create Unit/Integration tests using the Embedded
container and have some issues and questions. 1) Is it possible to supress
the need for a datasource. Lets say I don't have any entities and just want
to test some session beans. Is there any options using some properties or
dummy domain.xml file to supress the need of a database? 2) I am just using
Netbeans generated tests (and the project structure with the generated ant
build) of some very basic sample Stateless EJB's but as soon as I add a MDB
and start up the Embedded Container I get OutOfMemory Exceptions. I know that
MDB's are not supported but how to I tell Embedded Contianer to just ignore
it? Test is below and I am just using Netbeans to run file. [code] Person
person = null; EJBContainer container =
javax.ejb.embeddable.EJBContainer.createEJBContainer(); PersonServiceLocal
instance =
(PersonServiceLocal)container.getContext().lookup("java:global/classes/PersonService");
instance.addPerson(person); container.close(); [/code] Thanks Andreas

--
[Message sent by forum member 'sven-goran']
View Post: http://forums.java.net/node/891326