Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes EJB and other Java EE Technologies and the fly likes [EJB3UNIT] Data insertion in my database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "[EJB3UNIT] Data insertion in my database" Watch "[EJB3UNIT] Data insertion in my database" New topic
Author

[EJB3UNIT] Data insertion in my database

Fabian Angy
Ranch Hand

Joined: Oct 27, 2008
Posts: 90
Hi!

I have a question regarding data insertion into database with JUNIT Test (EJB3UNIT).

I'm testing my method which save record in my database, but, my new records are not saved in my database while they are created because when a record is created, the id are incremented when my method is called.

Thus, i wonder: it is possible that my data are deleted automatically after the insertion? (normal behavior of JUNIT Test or it is a problem with me?).

Thanks in advance.


SCJP 5
Ramana Rapally
Greenhorn

Joined: Mar 03, 2010
Posts: 1
HI Fabian,

I am new to EJB3Unit and trying to automate my EJB3 application unit-testing. I wanted to use Oracle database and configured ejb3unit.properties with relevant settings and ran my session bean testcases. It fails to connect to the database, I have verified the database connection via sqlplus and I was able to connect (I also tried connecting via TOAD, it works).

Below is the ejb3unit.properties file:


I am getting the below error:



As I can see that you were able to run your tests without any errors, could you please help me what I am doing wrong.

Thanks in advance.

Regards,
Ramana
 
jQuery in Action, 2nd edition
 
subject: [EJB3UNIT] Data insertion in my database
 
Similar Threads
ejb3unit
ejb3unit interceptors
Ejb3Unit and schema
ejb3unit and persistence
EJB3Unit