User: juha
Date: 00/06/11 11:17:14
Modified: src/main/org/jboss/ejb ContainerFactory.java
Log:
If the jBoss server is started with a -Djboss.verifier.isEnabled=true flag it will
run the verifier on the beans upon deployment.
Once we have verified the verifier works (!) we can turn the verifier on by default.
And create a nice mbean for it too.
Revision Changes Path
1.20 +27 -3 jboss/src/main/org/jboss/ejb/ContainerFactory.java
Index: ContainerFactory.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ContainerFactory.java 2000/06/02 09:23:00 1.19
+++ ContainerFactory.java 2000/06/11 18:17:14 1.20
@@ -51,6 +51,11 @@
import org.jboss.ejb.plugins.*;
+import org.jboss.verifier.BeanVerifier;
+import org.jboss.verifier.event.VerificationEvent;
+import org.jboss.verifier.event.VerificationListener;
+
+
/**
* A ContainerFactory is used to deploy EJB applications. It can be given a URL to
* an EJB-jar or EJB-JAR XML file, which will be used to instantiate containers
and make
@@ -59,7 +64,9 @@
* @see Container
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.19 $
+* @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>
+*
+* @version $Revision: 1.20 $
*/
public class ContainerFactory
implements ContainerFactoryMBean, MBeanRegistration
@@ -130,15 +137,32 @@
{
try
{
+ Log.setLog(log);
+
// Check if already deployed -> undeploy first, this is
re-deploy
if (deployments.containsKey(url))
undeploy(url);
-
+
+ // [JPL] for now, use verifier only for testing..
+ boolean useVerifier = Boolean.getBoolean("jboss.verifier.isEnabled");
+
+ if (useVerifier) {
+ BeanVerifier verifier = new BeanVerifier();
+
+ verifier.addVerificationListener(new VerificationListener() {
+
+ public void beanChecked(VerificationEvent event) {
+ System.out.println(event.getMessage());
+ }
+ });
+
+ verifier.verify(url);
+ }
+
// Create application
Application app = new Application();
app.setURL(url);
- Log.setLog(log);
log.log("Deploying:"+url);
// Create a file manager with which to load the files