• Post Reply Bookmark Topic Watch Topic
  • New Topic

Testing persistence Api(EJB 3) outside jboss container  RSS feed

 
ham rah
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to test persistence api outside jboss container.
For that i am using jboss embeddable ..I am trying to run the sample that is given on jboss site but didn't know how to configure the whole sample,so as to use jboss embeddable for JUnit test
After somehow configuring it i am getting "Local server not initialized" error.
Any idea how to do it with Jboss Embeddable
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically you will have the following code in your setup



Make sure you call
// Shutdown EJB container
EJB3StandaloneBootstrap.shutdown();

When you are done with the test.

The some-beans.xml looks something like this. The name of the file should be in the format of XXX-beans.xml



So now you can do code that gets and calls EJBs like so



HTH

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!