File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes Anyone know how to create a JUnit test for an EJB service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Anyone know how to create a JUnit test for an EJB service?" Watch "Anyone know how to create a JUnit test for an EJB service?" New topic
Author

Anyone know how to create a JUnit test for an EJB service?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm trying to write some JUnit tests for an EJB service I have running locally. I'm using JUnit 4.3 with Java 1.5. The problem I'm having is that I don't know what class to use for my initial context factory. Here is the code I have so far ...



Can anyone help? Thanks, - Dave
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29240
    
139

Dave,
I would use a framework like Cactus to get out of the remote call business. If you really want to do the remote call, the answer depends on your application server. Which one are you using?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
I'm using Resin 3.0.19. -
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29240
    
139

While we don't have a Resin forum, I'm going to move this to a different forum than Testing in hopes someone knows.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Anyone know how to create a JUnit test for an EJB service?
 
Similar Threads
NameNotFoundException with SUN's Application Server 8.1
calling Websphere EJB from Jboss EJB
configuring service provider for jndi lookup
EJB3 Null Pointer Exception
com/ibm/CORBA/iiop/ORB - Help