[jboss-cvs] JBossAS SVN: r63336 - branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/pkg/unit.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 4 15:18:26 EDT 2007
Author: bdecoste
Date: 2007-06-04 15:18:26 -0400 (Mon, 04 Jun 2007)
New Revision: 63336
Modified:
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/pkg/unit/EntityUnitTestCase.java
Log:
[EJBTHREE-981] set system properties in unit test
Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/pkg/unit/EntityUnitTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/pkg/unit/EntityUnitTestCase.java 2007-06-04 18:12:32 UTC (rev 63335)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/pkg/unit/EntityUnitTestCase.java 2007-06-04 19:18:26 UTC (rev 63336)
@@ -21,6 +21,10 @@
*/
package org.jboss.ejb3.test.pkg.unit;
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.ClientKernelAbstraction;
+import org.jboss.ejb3.KernelAbstractionFactory;
import org.jboss.ejb3.test.pkg.Customer;
import org.jboss.ejb3.test.pkg.EntityTest;
import org.jboss.test.JBossTestCase;
@@ -60,6 +64,22 @@
public static Test suite() throws Exception
{
+ ClientKernelAbstraction kernel = KernelAbstractionFactory.getClientInstance();
+ ObjectName propertiesServiceON = new ObjectName("jboss:type=Service,name=SystemProperties");
+ kernel.invoke(
+ propertiesServiceON,
+ "set",
+ new Object[]{"jta-data-source","java:/DefaultDS"},
+ new String[]{"java.lang.String", "java.lang.String"}
+ );
+
+ kernel.invoke(
+ propertiesServiceON,
+ "set",
+ new Object[]{"hibernate.hbm2ddl.auto","create-drop"},
+ new String[]{"java.lang.String", "java.lang.String"}
+ );
+
return getDeploySetup(EntityUnitTestCase.class, "pkg-test.jar");
}
More information about the jboss-cvs-commits
mailing list