NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
tdeit62
Joined: 06 Oct 2011 Posts: 36
|
Posted: Tue Oct 18, 2011 9:35 pm Post subject: Followup: Embedded glasfish in NB Maven Enterprise application for test purposes |
|
|
After some research I came across this blog:
http://pschyska.blogspot.com/2011/06/unit-testing-ejb-31-with-netbeans-maven.html
The solution works .. however, its essential to create a second ‘test’ persistence.xml (as explained in the blog), and also add the connection-pool, jdbc-resource (and the reference to it in <servers>). Otherwise the embedded server cannot access any data resources.
Hint: Do not be tempted to copy the domain config files from an existing full glassfish domain. The embedded domain.xml differs from the standard domain.xml. As suggested, copy them from the glassfish-embedded-all.jar.
‘domain.xml’ isn’t located together with the other config files in the jar, its under org/glassfish/embed while the others are under config/ .
If you are using something other than an embedded Derby database .. then both the DB driver class and the db itself must be available to any remote Hudson CI server, of course.
Tony Dietrich
From: Tony Dietrich [mailto:address-removed]
Sent: 17 October 2011 10:34
To: address-removed
Subject: Embedded glasfish in NB Maven Enterprise application for test purposes
Has anyone tried to use the maven embedded glassfish plugin to test their maven EA?
I can get it to sort of work (the embedded glassfish tries to load), but it crashes with two problems:
<![if !supportLists]>1) <![endif]>It tells me that my logging infrastructure contains an slf binding of 1.6 when the required binding is 1.5.6. I have slf/log4j set up in the main project, and the logging works OK there.
<![if !supportLists]>2) <![endif]>It cannot find the persistence context, because it seems to add ‘__pm’ to the end of the defined PU
C an anyone give me a hint?
Tony Dietrich |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|