org.glassfish.fighterfish.test.util
Class EntityBundle

java.lang.Object
  extended by org.glassfish.fighterfish.test.util.EntityBundle

public class EntityBundle
extends java.lang.Object

A class that helps tests in the deployment of entity bundles. An entity bundle is a bundle containing JPA entities which upon successful deployment registers a service of type EntityManagerFactory.

Author:
Sanjeeb.Sahoo@Sun.COM

Constructor Summary
EntityBundle(org.osgi.framework.BundleContext ctx, org.osgi.framework.Bundle b)
          Create a new EntityBundle
 
Method Summary
 void deploy(long timeout, java.util.concurrent.TimeUnit timeUnit)
          Deploy this entity bundle.
 org.osgi.framework.Bundle getBundle()
           
 void undeploy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityBundle

public EntityBundle(org.osgi.framework.BundleContext ctx,
                    org.osgi.framework.Bundle b)
Create a new EntityBundle

Parameters:
ctx - BundleContext of the test - this is not the bundle context of the entity bundle being deployed.
b - EntityBundle being deployed.
Method Detail

deploy

public void deploy(long timeout,
                   java.util.concurrent.TimeUnit timeUnit)
            throws org.osgi.framework.BundleException,
                   java.lang.InterruptedException
Deploy this entity bundle. If a service of type EntityManagerFactory does not get registered in the specified time, assume the deployment has failed and throw a TimeoutException.

Parameters:
timeout -
timeUnit -
Throws:
org.osgi.framework.BundleException
java.lang.InterruptedException

undeploy

public void undeploy()
              throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

getBundle

public org.osgi.framework.Bundle getBundle()


Copyright © 2013. All Rights Reserved.