|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.fighterfish.test.util.EjbBundle
public class EjbBundle
This class is used by tests to deploy Ejb Bundles. Since EJB deployment happens asynchronously when an EJB Bundle is activated, for a test case to know whether the deployment is successful or not is not as simple as checking if b.start() returns succesfully or not. This is where this class is helpful. Unlike OSGi Web Application container, OSGi EJB Spec does not raise events to indicating success or failure of events. So, this class relies on user to tell it at least one service that's being exported by this bundle to OSGi service registry. This class then uses a service tracker to wait for such a service to appear. If such a service does not show up in a specified amount of time, it times out the deployment operation.
| Constructor Summary | |
|---|---|
EjbBundle(org.osgi.framework.BundleContext ctx,
org.osgi.framework.Bundle b,
java.lang.String[] services)
A handle to the EJB bundle being deployed. |
|
| Method Summary | |
|---|---|
void |
deploy(long timeout,
java.util.concurrent.TimeUnit timeUnit)
Deploy the given EJB OSGi bundle. |
org.osgi.framework.Bundle |
getBundle()
|
void |
undeploy()
Undeploy the EJB OSGi bundle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EjbBundle(org.osgi.framework.BundleContext ctx,
org.osgi.framework.Bundle b,
java.lang.String[] services)
ctx - BundleContext of test used for various OSGi operation.b - Bundle to be deployed.services - Services that are expected to be made available by this EJB bundle if deployment is successful.| Method Detail |
|---|
public void deploy(long timeout,
java.util.concurrent.TimeUnit timeUnit)
throws org.osgi.framework.BundleException,
java.lang.InterruptedException,
TimeoutException
timeout - timeUnit -
org.osgi.framework.BundleException
java.lang.InterruptedException
TimeoutException
public void undeploy()
throws org.osgi.framework.BundleException
org.osgi.framework.BundleExceptionpublic org.osgi.framework.Bundle getBundle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||