• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Testing persistence Api(EJB 3) outside jboss container

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic