aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How to use JUnit and EJB3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to use JUnit and EJB3" Watch "How to use JUnit and EJB3" New topic
Author

How to use JUnit and EJB3

Georg Joo
Ranch Hand

Joined: Feb 24, 2004
Posts: 49
Hi

I want to test my EJB3 with JUnit. But I get allways following error :



The setup methode looks like :



My persistence.xml :


What can I do ? Where is the right place for the persistence.xml file ?


SCJP, SCWCD, SCBCD<br /> <br />Vienna, Austria
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10113
    
165

I havent worked with EJB3 much, but EJBs are server side components and they cannot be tested with JUnit. You might have to use Cactus instead, which is very similar to JUnit but allows you to test server side components.


[My Blog] [JavaRanch Journal]
Georg Joo
Ranch Hand

Joined: Feb 24, 2004
Posts: 49
Hi

I have the book "Pro EJB 3" of Apress. There is a description to test EJB3 with JUnit. It schoud be possible.

But I will take a look to Cactus.

Thanks
Georg


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use JUnit and EJB3