tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r609450 [2/3] - in /openejb/trunk/sandbox/openejb-eclipse-plugin: assembly/ features/org.apache.openejb.feature/.externalToolBuilders/ openejb-eclipse-plugin/ openejb-eclipse-plugin/assembly/ plugins/org.apache.openejb.helper.annotation.tes...
Date Sun, 06 Jan 2008 22:35:36 GMT
Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/ExpectedResult8.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/ExpectedResult8.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/ExpectedResult8.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/OpenEjbXmlConverterTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/OpenEjbXmlConverterTest.java?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/OpenEjbXmlConverterTest.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/OpenEjbXmlConverterTest.java Sun Jan  6 14:35:31 2008
@@ -0,0 +1,641 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.openejb.helper.annotation.tests;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+import javax.annotation.security.RunAs;
+import javax.ejb.MessageDriven;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
+import javax.interceptor.ExcludeClassInterceptors;
+import javax.interceptor.ExcludeDefaultInterceptors;
+import javax.interceptor.Interceptors;
+
+import junit.framework.TestCase;
+
+import org.apache.openejb.helper.annotation.IJavaProjectAnnotationFacade;
+import org.apache.openejb.helper.annotation.OpenEjbXmlConverter;
+import org.apache.openejb.jee.ActivationConfig;
+import org.apache.openejb.jee.AssemblyDescriptor;
+import org.apache.openejb.jee.ContainerTransaction;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.EnterpriseBean;
+import org.apache.openejb.jee.Interceptor;
+import org.apache.openejb.jee.InterceptorBinding;
+import org.apache.openejb.jee.MessageDrivenBean;
+import org.apache.openejb.jee.Method;
+import org.apache.openejb.jee.MethodParams;
+import org.apache.openejb.jee.MethodPermission;
+import org.apache.openejb.jee.NamedMethod;
+import org.apache.openejb.jee.RemoteBean;
+import org.apache.openejb.jee.SecurityIdentity;
+import org.apache.openejb.jee.SecurityRoleRef;
+import org.apache.openejb.jee.SessionBean;
+import org.apache.openejb.jee.StatefulBean;
+import org.apache.openejb.jee.TransAttribute;
+import org.apache.openejb.jee.TransactionType;
+import org.jmock.Expectations;
+import org.jmock.Mockery;
+import org.xml.sax.InputSource;
+
+
+/**
+ * Test case to ensure that the xml converter calls the correct methods
+ * on the annotation facade
+ */
+public class OpenEjbXmlConverterTest extends TestCase {
+	
+	protected Mockery context = new Mockery();
+	
+	public void testShouldAddTwoStatelessAnnotationsToSampleBeans() throws Exception {
+		// setup
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.Test1Bean", Stateless.class, null);
+			one(facade).addClassAnnotation("test.Test2Bean", Stateless.class, null);
+			one(facade).addClassAnnotation("test.Test1", Remote.class, null);
+			one(facade).addClassAnnotation("test.Test1Bean", RemoteHome.class, createNameValuePair("value", "test.Test1Home"));
+			one(facade).addClassAnnotation("test.Test2", Remote.class, null);
+			one(facade).addClassAnnotation("test.Test2Bean", RemoteHome.class, createNameValuePair("value", "test.Test2Home"));
+		}});
+
+		// execute
+		converter.convert(new InputSource(getClass().getResourceAsStream("sample-openejb-jar-two-statelessessionbeans.xml")));
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldAddTransactionManagementAttributes() throws Exception {
+		// setup
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", TransactionManagement.class, createNameValuePair("value", TransactionManagementType.BEAN));
+			one(facade).addClassAnnotation("test.TestBean", TransactionAttribute.class, createNameValuePair("value", TransactionAttributeType.MANDATORY));
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[] { "java.lang.String" }, TransactionAttribute.class, createNameValuePair("value", TransactionAttributeType.MANDATORY));
+		}});
+
+
+		EnterpriseBean enterpriseBean = new StatefulBean();
+		enterpriseBean.setEjbName("TestBean");
+		enterpriseBean.setEjbClass("test.TestBean");
+		enterpriseBean.setTransactionType(TransactionType.BEAN);
+		
+		AssemblyDescriptor descriptor = new AssemblyDescriptor();
+		
+		addMethodTransactionToDescriptor(descriptor, "TestBean", "*", new String[0]);
+		addMethodTransactionToDescriptor(descriptor, "TestBean", "test", new String[] { "java.lang.String" });
+		
+		// execute
+		converter.processTransactionManagement(enterpriseBean, descriptor);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldGenerateMethodPermissionAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], RolesAllowed.class, createNameValuePair("value", new String[] { "Admin" }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		addMethodToEjbJarDescriptor(ejbJar, "TestBean", "test", new String[] { "Admin" }, false, false);
+		
+		// execute
+		converter.processMethodPermissions(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+
+	private void addMethodToEjbJarDescriptor(EjbJar ejbJar, String beanName,
+			String methodName, String[] rolesAllowed, boolean unchecked, boolean deny) {
+		AssemblyDescriptor descriptor = ejbJar.getAssemblyDescriptor();
+		List<MethodPermission> methodPermissions = descriptor.getMethodPermission();
+		MethodPermission methodPermission = new MethodPermission();
+		List<Method> methods = methodPermission.getMethod();
+		methodPermission.getRoleName().addAll(Arrays.asList(rolesAllowed));
+		methodPermission.setUnchecked(unchecked);
+		methodPermissions.add(methodPermission);
+		Method method = new Method();
+		method.setEjbName(beanName);
+		method.setMethodName(methodName);
+		method.setMethodParams(new MethodParams());
+		methods.add(method);
+		
+		if (deny) {
+			descriptor.getExcludeList().addMethod(method);
+		}
+	}
+
+	private EnterpriseBean addStatefulBeanToEjbJar(EjbJar ejbJar, String beanName,
+			String beanClass) {
+		EnterpriseBean enterpriseBean = new StatefulBean();
+		enterpriseBean.setEjbName(beanName);
+		enterpriseBean.setEjbClass(beanClass);
+		ejbJar.addEnterpriseBean(enterpriseBean);
+		
+		return enterpriseBean;
+	}
+	
+	public void testShouldAddRolesAllowedAnnotationToClass() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", RolesAllowed.class, createNameValuePair("value", new String[] { "Admin" }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		addMethodToEjbJarDescriptor(ejbJar, "TestBean", "*", new String[] { "Admin" }, false, false);
+		
+		// execute
+		converter.processMethodPermissions(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldAddPermitAllToMethod() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], PermitAll.class, null);
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		addMethodToEjbJarDescriptor(ejbJar, "TestBean", "test", new String[] { "Admin" }, true, false);
+		
+		// execute
+		converter.processMethodPermissions(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldAddPermitAllToClass() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", PermitAll.class, null);
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		addMethodToEjbJarDescriptor(ejbJar, "TestBean", "*", new String[] { "Admin" }, true, false);
+		
+		// execute
+		converter.processMethodPermissions(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldAddDenyAllToMethod() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], DenyAll.class, null);
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		addMethodToEjbJarDescriptor(ejbJar, "TestBean", "test", new String[] { "Admin" }, true, true);
+		
+		// execute
+		converter.processMethodPermissions(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldGenerateRunAsAnnotation() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", RunAs.class, createNameValuePair("value", "Administrator"));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		
+		SecurityIdentity securityIdentity = new SecurityIdentity();
+		securityIdentity.setRunAs("Administrator");
+		bean.setSecurityIdentity(securityIdentity);
+		
+		// execute
+		converter.processBeanSecurityIdentity(bean);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldGenerateDeclaredRolesAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", DeclareRoles.class, createNameValuePair("value", new String[] { "Admin" }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+
+		RemoteBean remoteBean = (RemoteBean) bean;
+		remoteBean.getSecurityRoleRef().add(new SecurityRoleRef("Admin"));
+		
+		// execute
+		converter.processDeclaredRoles(bean);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldGenerateInterceptorAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", Interceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		
+		Interceptor interceptor = new Interceptor(OpenEjbXmlConverterTest.class);
+		ejbJar.addInterceptor(interceptor);
+		List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
+		
+		InterceptorBinding binding = new InterceptorBinding(bean, interceptor);
+		interceptorBindings.add(binding);
+		
+		// execute
+		converter.processInterceptors(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+
+	public void testShouldGenerateMethodInterceptorAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], Interceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		
+		Interceptor interceptor = new Interceptor(OpenEjbXmlConverterTest.class);
+		ejbJar.addInterceptor(interceptor);
+		List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
+		
+		InterceptorBinding binding = new InterceptorBinding(bean, interceptor);
+		NamedMethod method = new NamedMethod();
+		method.setMethodName("test");
+		method.setMethodParams(new MethodParams());
+		binding.setMethod(method);
+		interceptorBindings.add(binding);
+		
+		// execute
+		converter.processInterceptors(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+
+	public void testShouldGenerateExcludeDefaultInterceptorAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", Interceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+			one(facade).addClassAnnotation("test.TestBean", ExcludeDefaultInterceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		
+		Interceptor interceptor = new Interceptor(OpenEjbXmlConverterTest.class);
+		ejbJar.addInterceptor(interceptor);
+		List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
+		
+		InterceptorBinding binding = new InterceptorBinding(bean, interceptor);
+		binding.setExcludeDefaultInterceptors(true);
+		interceptorBindings.add(binding);
+		
+		// execute
+		converter.processInterceptors(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+
+	public void testShouldGenerateDefaultExcludeMethodInterceptorAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], ExcludeDefaultInterceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], Interceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		
+		Interceptor interceptor = new Interceptor(OpenEjbXmlConverterTest.class);
+		ejbJar.addInterceptor(interceptor);
+		List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
+		
+		InterceptorBinding binding = new InterceptorBinding(bean, interceptor);
+		binding.setExcludeDefaultInterceptors(true);
+		NamedMethod method = new NamedMethod();
+		method.setMethodName("test");
+		method.setMethodParams(new MethodParams());
+		binding.setMethod(method);
+		interceptorBindings.add(binding);
+		
+		// execute
+		converter.processInterceptors(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+
+	public void testShouldGenerateExcludeClassInterceptorAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", Interceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+			one(facade).addClassAnnotation("test.TestBean", ExcludeClassInterceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		
+		Interceptor interceptor = new Interceptor(OpenEjbXmlConverterTest.class);
+		ejbJar.addInterceptor(interceptor);
+		List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
+		
+		InterceptorBinding binding = new InterceptorBinding(bean, interceptor);
+		binding.setExcludeClassInterceptors(true);
+		interceptorBindings.add(binding);
+		
+		// execute
+		converter.processInterceptors(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+
+	public void testShouldGenerateClassExcludeMethodInterceptorAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], ExcludeClassInterceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+			one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], Interceptors.class, createNameValuePair("value", new String[] { OpenEjbXmlConverterTest.class.getCanonicalName() }));
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		
+		Interceptor interceptor = new Interceptor(OpenEjbXmlConverterTest.class);
+		ejbJar.addInterceptor(interceptor);
+		List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
+		
+		InterceptorBinding binding = new InterceptorBinding(bean, interceptor);
+		binding.setExcludeClassInterceptors(true);
+		NamedMethod method = new NamedMethod();
+		method.setMethodName("test");
+		method.setMethodParams(new MethodParams());
+		binding.setMethod(method);
+		interceptorBindings.add(binding);
+		
+		// execute
+		converter.processInterceptors(ejbJar);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldGenerateRemoteAnnotations() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.TestBean", Stateful.class, null);
+			one(facade).addClassAnnotation("test.TestBean", RemoteHome.class, createNameValuePair("value", "test.TestHome"));
+			one(facade).addClassAnnotation("test.Test", Remote.class, null);
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		StatefulBean bean = (StatefulBean) addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean");
+		bean.setHome("test.TestHome");
+		bean.setRemote("test.Test");
+		
+		// execute
+		converter.processSessionBean((SessionBean) bean);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	public void testShouldProcessMessageDrivenBean() throws Exception {
+		// setup
+		
+		final IJavaProjectAnnotationFacade facade = context.mock(IJavaProjectAnnotationFacade.class);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(facade);
+
+		// expectations
+		context.checking(new Expectations(){{
+			one(facade).addClassAnnotation("test.MessageDrivenBean1", MessageDriven.class, createActivationConfigProperty("destinationType", "javax.jms.Queue"));
+		}
+
+		private Map<String, Object> createActivationConfigProperty(
+				String propertyName, String propertyValue) {
+
+			Map<String, Object> activationConfigProperty = createNameValuePair("propertyName", propertyName);
+			activationConfigProperty.put("propertyValue", propertyValue);
+			
+			Map<String, Object> props = createNameValuePair("activationConfig", new Object[] { activationConfigProperty });
+			
+			return props;
+		}});
+
+		EjbJar ejbJar = new EjbJar();
+		MessageDrivenBean bean = new MessageDrivenBean();
+		bean.setEjbName("Test");
+		bean.setEjbClass("test.MessageDrivenBean1");
+		
+		bean.setActivationConfig(new ActivationConfig());
+		bean.getActivationConfig().addProperty("destinationType", "javax.jms.Queue");
+		bean.setMessageDestinationType("javax.jms.Queue");
+		bean.setMessageDestinationLink("TestQueue");
+				
+		ejbJar.addEnterpriseBean(bean);
+		
+		
+		// execute
+		converter.processMessageDrivenBean(bean);
+
+		// verify
+		context.assertIsSatisfied();
+	}
+	
+	private void addMethodTransactionToDescriptor(AssemblyDescriptor descriptor, String ejbName, String methodName, String[] params) {
+		List<ContainerTransaction> containerTransactions = descriptor.getContainerTransaction();
+		ContainerTransaction containerTransaction = new ContainerTransaction();
+
+		containerTransaction.getMethod().add(createMethod(ejbName, methodName, params));
+		containerTransaction.setTransAttribute(TransAttribute.MANDATORY);
+		containerTransactions.add(containerTransaction);
+	}
+
+	private Method createMethod(String ejbName, String methodName, String[] params) {
+		Method method = new Method(ejbName, methodName);
+		MethodParams methodParams = new MethodParams();
+
+		for (int i = 0; i < params.length; i++) {
+			methodParams.getMethodParam().add(params[i]);
+		}
+		
+		method.setMethodParams(methodParams);
+		return method;
+	}
+	
+	private Map<String, Object> createNameValuePair(String key,
+			Object value) {
+		
+		Map<String, Object> result = new HashMap<String, Object>() {
+
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			public boolean equals(Object otherObj) {
+				
+				if (!( otherObj instanceof Map)) {
+					return false;
+				}
+				
+				if (otherObj == null) {
+					return false;
+				}
+				
+				Map<?,?> otherMap = (Map<?,?>) otherObj;
+				
+				Iterator<String> iterator = this.keySet().iterator();
+				while (iterator.hasNext()) {
+					String key = (String) iterator.next();
+					Object value = this.get(key);
+					
+					if (value.getClass().isArray()) {
+						if (! Arrays.deepEquals((Object[])value, (Object[])otherMap.get(key))) {
+							return false;
+						}
+					} else {
+						if (! value.equals(otherMap.get(key))) {
+							return false;
+						}
+					}
+				}
+				
+				return true;
+			}
+			
+		};
+		
+		result.put(key, value);
+		return result;
+	}
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/OpenEjbXmlConverterTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/OpenEjbXmlConverterTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/OpenEjbXmlConverterTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test1.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test1.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test1.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test1.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,9 @@
+package org.apache.openejb.test;
+
+public class TestBean1 {
+
+	public void echoHelloWorld() {
+		System.out.println("Hello, world!");
+	}
+	
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test1.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test1.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test2.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test2.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test2.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test2.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,11 @@
+package org.apache.openejb.test;
+
+import javax.ejb.Stateless;
+
+public class TestBean2 {
+
+	public void echoHelloWorld() {
+		System.out.println("Hello, world!");
+	}
+	
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test2.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test2.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test3.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test3.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test3.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test3.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,9 @@
+package org.apache.openejb.test;
+
+public class TestBean3 {
+
+	public void echoHelloWorld() {
+		System.out.println("Hello, world!");
+	}
+	
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test3.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test3.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test3.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test4.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test4.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test4.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test4.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,9 @@
+package org.apache.openejb.test;
+
+public class TestBean4 {
+
+	public void echoHelloWorld() {
+		System.out.println("Hello, world!");
+	}
+	
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test4.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test4.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test4.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test5.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test5.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test5.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test5.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,9 @@
+package org.apache.openejb.test;
+
+public class TestBean5 {
+
+	public void echoHelloWorld() {
+		System.out.println("Hello, world!");
+	}
+	
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test5.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test5.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test5.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test6.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test6.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test6.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test6.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,13 @@
+package org.apache.openejb.test;
+
+public class TestBean6 {
+
+	public void echoHelloWorld(String name) {
+		System.out.println("Hello, world!");
+	}
+
+	public void echoHelloWorld() {
+		System.out.println("Hello, world!");
+	}
+	
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test6.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test6.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test6.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test7.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test7.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test7.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test7.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,9 @@
+package org.apache.openejb.test;
+
+public class TestBean7 {
+
+	public void echoHelloWorld() {
+		System.out.println("Hello, world!");
+	}
+	
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test7.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test7.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test7.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test8.txt
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test8.txt?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test8.txt (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test8.txt Sun Jan  6 14:35:31 2008
@@ -0,0 +1,16 @@
+package org.apache.openejb.test;
+
+import javax.ejb.EJBException;
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+
+public class TestBean8 implements MessageDrivenBean {
+
+	public void ejbRemove() throws EJBException {
+	}
+
+	public void setMessageDrivenContext(MessageDrivenContext ctx)
+			throws EJBException {
+	}
+
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test8.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test8.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/Test8.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/sample-openejb-jar-two-statelessessionbeans.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/sample-openejb-jar-two-statelessessionbeans.xml?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/sample-openejb-jar-two-statelessessionbeans.xml (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/sample-openejb-jar-two-statelessessionbeans.xml Sun Jan  6 14:35:31 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar  xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
+   <display-name>Generated by XDoclet</display-name>
+   <enterprise-beans>
+      <session >
+         <description><![CDATA[]]></description>
+         <ejb-name>Test1Bean</ejb-name>
+         <home>test.Test1Home</home>
+         <remote>test.Test1</remote>
+         <local-home>test.Test1HomeLocal</local-home>
+         <local>test.Test1Local</local>
+         <ejb-class>test.Test1Bean</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
+      <session >
+         <description><![CDATA[]]></description>
+         <ejb-name>Test2Bean</ejb-name>
+         <home>test.Test2Home</home>
+         <remote>test.Test2</remote>
+         <local-home>test.Test2HomeLocal</local-home>
+         <local>test.Test2Local</local>
+         <ejb-class>test.Test2Bean</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
+  </enterprise-beans>
+</ejb-jar>
\ No newline at end of file

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/sample-openejb-jar-two-statelessessionbeans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/sample-openejb-jar-two-statelessessionbeans.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation.test/src/main/java/org/apache/openejb/helper/annotation/tests/sample-openejb-jar-two-statelessessionbeans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/META-INF/MANIFEST.MF?rev=609450&r1=609449&r2=609450&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/META-INF/MANIFEST.MF (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/META-INF/MANIFEST.MF Sun Jan  6 14:35:31 2008
@@ -8,6 +8,7 @@
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.eclipse.core.resources,
+ org.eclipse.core.commands,
  org.eclipse.jdt.core,
  org.eclipse.core.filebuffers,
  org.eclipse.jface.text,
@@ -25,9 +26,15 @@
  lib/geronimo-activation_1.1_spec-1.0.jar,
  lib/geronimo-stax-api_1.0_spec-1.0.jar,
  lib/openejb-jee-3.0.0-SNAPSHOT.jar,
+ lib/openejb-core-3.0.0-SNAPSHOT.jar,
+ lib/openejb-loader-3.0.0-SNAPSHOT.jar,
  lib/xbean-finder-3.2-SNAPSHOT.jar,
  lib/geronimo-ejb_3.0_spec-1.0.jar,
  lib/geronimo-annotation_1.0_spec-1.1.jar,
- lib/geronimo-interceptor_3.0_spec-1.0.jar
+ lib/geronimo-interceptor_3.0_spec-1.0.jar,
+ lib/wsdl4j-1.6.1.jar,
+ lib/geronimo-jpa_3.0_spec-1.1.jar,
+ lib/log4j-1.2.12.jar,
+ lib/swizzle-stream-1.0.1.jar
 Main-Class: org.apache.openejb.helper.annotation.cli.Main
 Export-Package: org.apache.openejb.helper.annotation

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/plugin.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/plugin.xml?rev=609450&r1=609449&r2=609450&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/plugin.xml (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/plugin.xml Sun Jan  6 14:35:31 2008
@@ -1,50 +1,48 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
-   <extension
-         point="org.eclipse.ui.popupMenus">
-      <objectContribution
-            adaptable="false"
-            id="org.apache.openejb.helper.annotation.context"
-            nameFilter="ejb-jar.xml"
-            objectClass="org.eclipse.core.resources.IFile">
-         <menu
-               id="org.apache.openejb.helper.annotation.menu1"
-               label="OpenEjb"
-               path="additions">
-            <separator name="group1"/>
-         </menu>
-         <action
-               class="org.apache.openejb.helper.annotation.actions.GenerateAnnotationsAction"
-               enablesFor="1"
-               id="org.apache.openejb.helper.annotation.popup.generate"
-               label="Generate annotations"
-               menubarPath="org.apache.openejb.helper.annotation.menu1/group1"/>
-      </objectContribution>
-   </extension>
-   <extension
-         point="org.eclipse.ui.actionSets">
-         
-      <actionSet
-            id="org.apache.openejb.helper.annotation.actionSet"
-            label="OpenEjb Action Set"
-            visible="true">
-         <menu
-               id="org.apache.openejb.helper.annotation.actionSet.menu"
-               label="OpenEjb">
-            <separator name="org.apache.openejb.helper.annotation.menu.group1"/>
-         </menu>
-         <action
-               class="org.apache.openejb.helper.annotation.actions.GenerateAnnotationsAction"
-               enablesFor="1"
-               icon="icons/sample.gif"
-               id="org.apache.openejb.helper.annotation.menu.generate"
-               label="Generate annotations"
-               menubarPath="org.apache.openejb.helper.annotation.actionSet.menu/org.apache.openejb.helper.annotation.menu.group1">
-           <selection class="org.eclipse.core.resources.IFile" name="ejb-jar.xml"/>
-         </action>
-      </actionSet>
-   </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.ui.popupMenus">
+      <objectContribution
+            adaptable="false"
+            id="org.apache.openejb.helper.annotation.context"
+            nameFilter="ejb-jar.xml"
+            objectClass="org.eclipse.core.resources.IFile">
+         <menu
+               id="org.apache.openejb.helper.annotation.menu1"
+               label="OpenEJB"
+               path="additions">
+            <separator name="group1"/>
+         </menu>
+         <action
+               class="org.apache.openejb.helper.annotation.actions.GenerateAnnotationsAction"
+               enablesFor="1"
+               id="org.apache.openejb.helper.annotation.popup.generate"
+               label="Generate annotations"
+               menubarPath="org.apache.openejb.helper.annotation.menu1/group1"/>
+      </objectContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.actionSets">
+         
+      <actionSet
+            id="org.apache.openejb.helper.annotation.actionSet"
+            label="OpenEjb Action Set"
+            visible="true">
+         <menu
+               id="org.apache.openejb.helper.annotation.actionSet.menu"
+               label="OpenEJB">
+            <separator name="org.apache.openejb.helper.annotation.menu.group1"/>
+         </menu>
+         <action
+               class="org.apache.openejb.helper.annotation.actions.GenerateAnnotationsAction"
+               icon="icons/sample.gif"
+               id="org.apache.openejb.helper.annotation.menu.generate"
+               label="Generate annotations"
+               menubarPath="org.apache.openejb.helper.annotation.actionSet.menu/org.apache.openejb.helper.annotation.menu.group1">
+         </action>
+      </actionSet>
+   </extension>
+
+</plugin>

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/pom.xml?rev=609450&r1=609449&r2=609450&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/pom.xml (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/pom.xml Sun Jan  6 14:35:31 2008
@@ -120,9 +120,39 @@
                   <version>1.1</version>
                 </artifactItem>
                 <artifactItem>
-			        <groupId>org.apache.geronimo.specs</groupId>
-			        <artifactId>geronimo-interceptor_3.0_spec</artifactId>
-			        <version>1.0</version>
+                  <groupId>org.apache.geronimo.specs</groupId>
+                  <artifactId>geronimo-interceptor_3.0_spec</artifactId>
+                  <version>1.0</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.openejb</groupId>
+                  <artifactId>openejb-core</artifactId>
+                  <version>3.0.0-SNAPSHOT</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.openejb</groupId>
+                  <artifactId>openejb-loader</artifactId>
+                  <version>3.0.0-SNAPSHOT</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>wsdl4j</groupId>
+                  <artifactId>wsdl4j</artifactId>
+                  <version>1.6.1</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.geronimo.specs</groupId>
+                  <artifactId>geronimo-jpa_3.0_spec</artifactId>
+                  <version>1.1</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>log4j</groupId>
+                  <artifactId>log4j</artifactId>
+                  <version>1.2.12</version>
+                </artifactItem>
+                <artifactItem>
+			      <groupId>org.codehaus.swizzle</groupId>
+			      <artifactId>swizzle-stream</artifactId>
+			      <version>1.0.1</version>
                 </artifactItem>
               </artifactItems>
             </configuration>
@@ -183,6 +213,16 @@
       <version>3.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>3.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-loader</artifactId>
+      <version>3.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
       <groupId>javax.xml</groupId>
       <artifactId>jsr173</artifactId>
       <version>1.0</version>
@@ -193,9 +233,29 @@
       <version>1.1</version>
     </dependency>
     <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-interceptor_3.0_spec</artifactId>
-        <version>1.0</version>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-interceptor_3.0_spec</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>wsdl4j</groupId>
+      <artifactId>wsdl4j</artifactId>
+      <version>1.6.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jpa_3.0_spec</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.12</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.swizzle</groupId>
+      <artifactId>swizzle-stream</artifactId>
+      <version>1.0.1</version>
     </dependency>
   </dependencies>
 </project>

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/ConversionException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/ConversionException.java?rev=609450&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/ConversionException.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/ConversionException.java Sun Jan  6 14:35:31 2008
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.helper.annotation;
+
+/**
+ * Represents a conversion error from trying to generate annotations
+ * using the OpenEjbXmlConverter
+ */
+public class ConversionException extends Exception {
+
+	public ConversionException() {
+	}
+
+	/**
+	 * @param message
+	 */
+	public ConversionException(String message) {
+		super(message);
+	}
+
+	/**
+	 * @param throwable
+	 */
+	public ConversionException(Throwable throwable) {
+		super(throwable);
+	}
+
+	/**
+	 * @param message
+	 * @param throwable
+	 */
+	public ConversionException(String message, Throwable throwable) {
+		super(message, throwable);
+	}
+}

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/ConversionException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/ConversionException.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/ConversionException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java?rev=609450&r1=609449&r2=609450&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java Sun Jan  6 14:35:31 2008
@@ -17,8 +17,6 @@
  
 package org.apache.openejb.helper.annotation;
 
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -43,12 +41,18 @@
 import javax.interceptor.ExcludeClassInterceptors;
 import javax.interceptor.ExcludeDefaultInterceptors;
 import javax.interceptor.Interceptors;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.sax.SAXSource;
-
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.config.AppModule;
+import org.apache.openejb.config.CmpJpaConversion;
+import org.apache.openejb.config.EjbModule;
+import org.apache.openejb.config.InitEjbDeployments;
+import org.apache.openejb.config.OpenEjb2Conversion;
 import org.apache.openejb.jee.ActivationConfig;
 import org.apache.openejb.jee.ActivationConfigProperty;
 import org.apache.openejb.jee.ApplicationException;
@@ -71,8 +75,17 @@
 import org.apache.openejb.jee.StatefulBean;
 import org.apache.openejb.jee.StatelessBean;
 import org.apache.openejb.jee.TransactionType;
+import org.apache.openejb.jee.jpa.Attributes;
+import org.apache.openejb.jee.jpa.Basic;
+import org.apache.openejb.jee.jpa.Column;
+import org.apache.openejb.jee.jpa.EntityMappings;
+import org.apache.openejb.jee.jpa.FetchType;
+import org.apache.openejb.jee.oejb2.JaxbOpenejbJar2;
+import org.apache.openejb.jee.oejb2.OpenejbJarType;
+import org.apache.openejb.jee.oejb3.OpenejbJar;
 import org.eclipse.core.resources.IProject;
 import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
 
 /**
  * Scans an ejb-jar.xml file using a JAXB parser, and adds annotations
@@ -113,21 +126,195 @@
 	 * Parses the XML
 	 * @param source An input source to the content of ejb-jar.xml
 	 * @return Whether or not the parsing was successful
+	 * @throws ConversionException 
 	 */
-	public boolean convert(InputSource source) {
-		try {
-			EjbJar ejbJar = (EjbJar) JaxbJavaee.unmarshal(EjbJar.class, source.getByteStream());
-			
+	public boolean convert(InputSource source) throws ConversionException {
+		return convert(source, null);
+	}
+
+	/**
+	 * Parses the XML
+	 * @param ejbJarSrc An input source to the content of ejb-jar.xml
+	 * @param openEjbJarSrc An input source to the content of openejb-jar.xml (optional)
+	 * @return Whether or not the parsing was successful
+	 * @throws ConversionException 
+	 */
+	@SuppressWarnings("unchecked")
+	public boolean convert(InputSource ejbJarSrc, InputSource openEjbJarSrc) throws ConversionException {
+		try {	
+			EjbJar ejbJar = (EjbJar) JaxbJavaee.unmarshal(EjbJar.class, ejbJarSrc.getByteStream());
+	        EjbModule ejbModule = new EjbModule(ejbJar, new OpenejbJar());
+
 			processEnterpriseBeans(ejbJar);
 			processApplicationExceptions(ejbJar);
 			
+			if (openEjbJarSrc != null) {
+		        InitEjbDeployments initEjbDeployments = new InitEjbDeployments();
+		        initEjbDeployments.deploy(ejbModule, new HashMap<String,String>());
+		        AppModule appModule = new AppModule(getClass().getClassLoader(), "TestModule");
+		        appModule.getEjbModules().add(ejbModule);
+
+		        JAXBElement element = (JAXBElement) JaxbOpenejbJar2.unmarshal(OpenejbJarType.class, openEjbJarSrc.getByteStream());
+		        OpenejbJarType openejbJarType = (OpenejbJarType) element.getValue();
+		        ejbModule.getAltDDs().put("openejb-jar.xml", openejbJarType);
+
+		        CmpJpaConversion cmpJpaConversion = new CmpJpaConversion();
+		        cmpJpaConversion.deploy(appModule);
+
+		        OpenEjb2Conversion openEjb2Conversion = new OpenEjb2Conversion();
+		        openEjb2Conversion.deploy(appModule);
+
+				processEntityBeans(appModule);
+			}
+			
 			return true;
-		} catch (Exception e) {
-			e.printStackTrace();
-			return false;
+		} catch (JAXBException e) {
+			throw new ConversionException("Unable to unmarshal XML", e);
+		} catch (ParserConfigurationException e) {
+			throw new ConversionException("Unable to unmarshal XML (parser configuration error)", e);
+		} catch (SAXException e) {
+			throw new ConversionException("Unable to unmarshal XML (SAX error - XML badly formed?)", e);
+		} catch (OpenEJBException e) {
+			throw new ConversionException("Unable to convert openejb-jar.xml to orm.xml");
+		}
+	}
+
+	private void processEntityBeans(AppModule appModule) {
+		EntityMappings entityMappings = appModule.getCmpMappings();
+		List<EntityBean> entityBeans = getEntityBeans(appModule);
+		
+		for (EntityBean entityBean : entityBeans) {
+			annotationHelper.addClassAnnotation(entityBean.getEjbClass(), Entity.class, null);
+			org.apache.openejb.jee.jpa.Entity entity = getEntity(entityMappings, entityBean.getEjbName());
+			
+			if (entity != null) {
+				addTableAnnotation(entityBean, entity);
+			
+				Attributes attributes = entity.getAttributes();
+				addBasicAnnotations(entityBean, attributes.getBasic());
+			}
 		}
 	}
 
+	private void addBasicAnnotations(EntityBean entityBean,	List<Basic> basicAttributes) {
+		for (Basic basic : basicAttributes) {
+			String fieldName = basic.getName();
+			Column column = basic.getColumn();
+			
+			addBasicAnnotation(entityBean, fieldName, basic, column);
+		}
+	}
+
+	private void addBasicAnnotation(EntityBean entityBean, String fieldName, Basic basic, Column column) {
+		addColumnAnnotation(entityBean, fieldName, column);
+		Boolean optional = basic.isOptional();
+		FetchType fetchType = basic.getFetch();
+		
+		Map<String, Object> basicProps = new HashMap<String, Object>();
+		if (optional != null) basicProps.put("optional", optional.booleanValue());
+		if (fetchType != null) basicProps.put("fetch", fetchType.value());
+		
+//		annotationHelper.addFieldAnnotation(entityBean.getEjbClass(), fieldName, javax.persistence.Basic.class, basicProps);
+
+		String methodName = convertFieldNameToGetterName(fieldName);
+		annotationHelper.addMethodAnnotation(entityBean.getEjbClass(), methodName, new String[0], javax.persistence.Basic.class, basicProps);
+ 	}
+
+	private String convertFieldNameToGetterName(String fieldName) {
+		String methodName = "get" + capitaliseFirstLetter(fieldName);
+		return methodName;
+	}
+
+	private String capitaliseFirstLetter(String fieldName) {
+		if (fieldName == null) {
+			return null;
+		}
+		
+		if (fieldName.length() == 0) {
+			return fieldName;
+		}
+		
+		String firstLetter = fieldName.substring(0, 1).toUpperCase();
+		String restOfWord = "";
+		
+		if (fieldName.length() > 1) {
+			restOfWord = fieldName.substring(1);
+		}
+		
+		return firstLetter + restOfWord;
+	}
+
+	private void addColumnAnnotation(EntityBean entityBean, String fieldName, Column column) {
+		Map<String, Object> columnProps = new HashMap<String, Object>();
+		if (column.getName() != null) columnProps.put("name", column.getName());
+		if (column.isUnique() != null) columnProps.put("unique", column.isUnique().booleanValue());
+		if (column.isNullable() != null) columnProps.put("nullable", column.isNullable().booleanValue());
+		if (column.isInsertable() != null) columnProps.put("insertable", column.isInsertable().booleanValue());
+		if (column.isUpdatable() != null) columnProps.put("updatable", column.isUpdatable().booleanValue());
+		if (column.getColumnDefinition() != null) columnProps.put("columnDefinition", column.getColumnDefinition());
+		if (column.getTable() != null) columnProps.put("table", column.getTable());
+		if (column.getLength() != null) columnProps.put("length", column.getLength().intValue());
+		if (column.getPrecision() != null) columnProps.put("precision", column.getPrecision().intValue());
+		if (column.getScale() != null) columnProps.put("scale", column.getScale().intValue());
+		
+//		annotationHelper.addFieldAnnotation(entityBean.getEjbClass(), fieldName, javax.persistence.Column.class, columnProps);
+
+		String methodName = convertFieldNameToGetterName(fieldName);
+		annotationHelper.addMethodAnnotation(entityBean.getEjbClass(), methodName, new String[0], javax.persistence.Column.class, columnProps);
+
+	}
+
+	private void addTableAnnotation(EntityBean entityBean,
+			org.apache.openejb.jee.jpa.Entity entity) {
+		String tableName = entity.getTable().getName();
+		String schemaName = entity.getTable().getSchema();
+		String catalogName = entity.getTable().getCatalog();
+		
+		Map<String, Object> tableProperties = new HashMap<String, Object>();
+		if (tableName != null && tableName.length() > 0) {
+			tableProperties.put("name", tableName);
+		}
+		
+		if (schemaName != null && schemaName.length() > 0) {
+			tableProperties.put("schema", schemaName);
+		}
+		
+		if (catalogName != null && catalogName.length() > 0) {
+			tableProperties.put("catalog", catalogName);
+		}
+		
+		annotationHelper.addClassAnnotation(entityBean.getEjbClass(), Table.class, tableProperties);
+	}
+
+	private org.apache.openejb.jee.jpa.Entity getEntity(EntityMappings entityMappings, String ejbName) {
+		List<org.apache.openejb.jee.jpa.Entity> entities = entityMappings.getEntity();
+		
+		for (org.apache.openejb.jee.jpa.Entity entity : entities) {
+			if (entity.getName().equals(ejbName)) {
+				return entity;
+			}
+		}
+		
+		return null;
+	}
+
+	private List<EntityBean> getEntityBeans(AppModule appModule) {
+		List<EntityBean> result = new ArrayList<EntityBean>();
+		
+		List<EjbModule> ejbModules = appModule.getEjbModules();
+		for (EjbModule ejbModule : ejbModules) {
+			EnterpriseBean[] enterpriseBeans = ejbModule.getEjbJar().getEnterpriseBeans();
+			
+			for (EnterpriseBean enterpriseBean : enterpriseBeans) {
+				if (enterpriseBean instanceof EntityBean) {
+					result.add((EntityBean) enterpriseBean);
+				}
+			}
+		}
+		
+		return result;
+	}
+
 	private void processApplicationExceptions(EjbJar ejbJar) {
 		List<ApplicationException> exceptionList = ejbJar.getAssemblyDescriptor().getApplicationException();
 		Iterator<ApplicationException> iterator = exceptionList.iterator();
@@ -148,9 +335,6 @@
 			if (bean instanceof SessionBean) {
 				SessionBean sessionBean = (SessionBean) bean;
 				processSessionBean(sessionBean);
-			} else if (bean instanceof EntityBean) {
-				EntityBean entityBean = (EntityBean) bean;
-				processEntityBean(entityBean);
 			} else if (bean instanceof MessageDrivenBean) {
 				MessageDrivenBean messageDriven = (MessageDrivenBean) bean;
 				processMessageDrivenBean(messageDriven);
@@ -233,8 +417,6 @@
 		annotationHelper.addClassAnnotation(bean.getEjbClass(), MessageDriven.class, props);
 	}
 
-	private void processEntityBean(EntityBean entityBean) {
-	}
 
 	public void processSessionBean(SessionBean sessionBean) {
 		String ejbClass = sessionBean.getEjbClass();

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java?rev=609450&r1=609449&r2=609450&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java Sun Jan  6 14:35:31 2008
@@ -23,6 +23,8 @@
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -56,12 +58,10 @@
 	 * @see IActionDelegate#run(IAction)
 	 */
 	public void run(IAction action) {
-		if (resource == null) {
-			return;
+		EJBMigrationRefactoring refactoring = new EJBMigrationRefactoring(ResourcesPlugin.getWorkspace().getRoot());
+		if (resource instanceof IProject || resource instanceof IFile) {
+			refactoring.setProject(resource.getProject());			
 		}
-
-		EJBMigrationRefactoring refactoring = new EJBMigrationRefactoring();
-		refactoring.setProject(resource.getProject());
 		
 		if (resource instanceof IFile) {
 			refactoring.setEjbJarXmlFile(resource.getProjectRelativePath().toString());
@@ -71,7 +71,6 @@
 		try {
 			op.run(Activator.getWorkbenchWindow().getShell(), "Dialog");
 		} catch (InterruptedException e) {
-			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 	}
@@ -91,17 +90,17 @@
 			if (firstElement instanceof IProject) {
 				resource = (IProject) firstElement;
 			}
+			
+			if (firstElement instanceof IJavaProject) {
+				resource =  ((IJavaProject)firstElement).getResource();
+			}
 		}
 	}
 
 	public void dispose() {
-		// TODO Auto-generated method stub
-		
 	}
 
 	public void init(IWorkbenchWindow window) {
-		// TODO Auto-generated method stub
-		
 	}
 
 }

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java?rev=609450&r1=609449&r2=609450&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java Sun Jan  6 14:35:31 2008
@@ -1,96 +1,188 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-package org.apache.openejb.helper.annotation.wizards;
-
-import java.io.File;
-
-import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-public class EJBJarSelectionPage extends UserInputWizardPage {
-
-	protected String ejbJarXmlFile;
-	protected String openEjbJarXmlFile;
-	
-	protected Text ejbJarXmlFileText;
-	protected Text openEjbJarXmlFileText;
-
-	public EJBJarSelectionPage() {
-		super("wizardPage");
-		setTitle("EJB 3.0 Annotation Wizard");
-		setDescription("This wizard analyzes ejb-jar.xml and openejb-jar.xml and adds EJB 3.0 annotations to your source");
-	}
-	
-	public void createControl(Composite parent) {
-		Composite container = new Composite(parent, SWT.NULL);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 3;
-		container.setLayout(layout);
-		
-		Label ejbJarXmlLabel = new Label(container, SWT.NULL);
-		ejbJarXmlLabel.setText("&EJB Jar File");
-		
-		ejbJarXmlFileText = new Text(container, SWT.BORDER | SWT.SINGLE);
-		ejbJarXmlFileText.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				checkPage();
-			}
-		});
-		
-		Button ejbJarBrowseButton = new Button(container, SWT.PUSH);
-		ejbJarBrowseButton.setText("&Browse");
-		ejbJarBrowseButton.addListener(SWT.Selection, new Listener(){
-			public void handleEvent(Event event) {
-				handleEjbJarBrowse();
-			}
-		});
-		
-		setControl(container);
-	}
-	
-	protected void handleEjbJarBrowse() {
-		FileDialog fileDialog = new FileDialog(getShell());
-		fileDialog.setFilterNames(new String[] {"ejb-jar.xml"});
-		String filename = fileDialog.open();
-		ejbJarXmlFileText.setText(filename);
-		
-		checkPage();
-	}
-
-	protected void checkPage() {
-		ejbJarXmlFile = ejbJarXmlFileText.getText();
-		
-		if (! new File(ejbJarXmlFile).exists()) {
-			setErrorMessage("Please select an ejb-jar.xml file");
-			setPageComplete(false);
-		} else {
-			setErrorMessage(null);
-			setPageComplete(true);
-		}
-	}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.openejb.helper.annotation.wizards;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+public class EJBJarSelectionPage extends UserInputWizardPage {
+
+	private static final Status SELECTION_NOT_OK_STATUS = new Status(4, "org.apache.openejb.helper.annotation", 4, "", null);
+	private static final Status SELECTION_OK_STATUS = new Status(0, "org.eclipse.core.runtime", 0, "", null);
+
+	private final EJBMigrationRefactoring refactoring;
+	private Text ejbJarXmlText;
+	private Text openEjbJarXmlText;
+	
+	public EJBJarSelectionPage(EJBMigrationRefactoring refactoring) {
+		super("wizardPage");
+		setTitle("EJB 3.0 Annotation Wizard");
+		setDescription("This wizard analyzes ejb-jar.xml and openejb-jar.xml and adds EJB 3.0 annotations to your source");
+		this.refactoring = refactoring;
+	}
+
+	public void createControl(Composite parent) {
+		Composite container = new Composite(parent, SWT.NULL);
+		GridData textData = new GridData();
+		textData.widthHint = 200;
+		
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.numColumns = 3;
+		container.setLayout(gridLayout);
+		
+		Label ejbJarXmlLabel = new Label(container, SWT.NONE);
+		ejbJarXmlLabel.setText("ejb-jar.xml location");
+
+		ejbJarXmlText = new Text(container, SWT.BORDER);
+		ejbJarXmlText.setText(refactoring.getEjbJarXmlFile());
+		ejbJarXmlText.setLayoutData(textData);
+		ejbJarXmlText.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
+			public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
+				checkPage();
+			}
+		});
+		
+		Button browseEjbJarButton = new Button(container, SWT.NONE);
+		browseEjbJarButton.setText("Browse");
+		browseEjbJarButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
+			public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
+				String filename = handleBrowse("Select ejb-jar.xml file");
+				if (filename != null && filename.length() > 0) {
+					ejbJarXmlText.setText(filename);
+					checkPage();
+				}
+			}
+		});
+		
+		Label openEjbJarXmlLabel = new Label(container, SWT.NONE);
+		openEjbJarXmlLabel.setText("openejb-jar.xml location (optional)");
+		
+		openEjbJarXmlText = new Text(container, SWT.BORDER);
+		openEjbJarXmlText.setText(refactoring.getOpenEjbJarXmlFile());
+		openEjbJarXmlText.setLayoutData(textData);
+		openEjbJarXmlText.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
+			public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
+				checkPage();
+			}
+		});
+
+		Button browseOpenEjbJarXmlButton = new Button(container, SWT.NONE);
+		browseOpenEjbJarXmlButton.setText("Browse");
+		browseOpenEjbJarXmlButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
+			public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
+				String filename = handleBrowse("Select openejb-jar.xml file");
+				if (filename != null && filename.length() > 0) {
+					openEjbJarXmlText.setText(filename);
+					checkPage();
+				}
+			}
+		});
+
+		
+		setControl(container);
+		checkPage();
+	}
+	
+	protected String handleBrowse(String title) {
+		ElementTreeSelectionDialog etsd = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+		etsd.setInput(refactoring.getProject().getWorkspace());
+		etsd.addFilter(new ViewerFilter() {
+
+			@Override
+			public boolean select(Viewer viewer, Object parentElement, Object element) {
+				
+				if (element instanceof IFile) {
+					return ((IFile)element).getFileExtension().equals("xml");
+				}
+				
+				if (element instanceof IProject) {
+					return ((IProject)element).equals(refactoring.getProject()); 
+				}
+				
+				return true;
+			}
+			
+		});
+		
+		etsd.setValidator(new ISelectionStatusValidator() {
+			public IStatus validate(Object[] selection) {
+				return (selection.length == 1 && selection[0] instanceof IFile) ? SELECTION_OK_STATUS : SELECTION_NOT_OK_STATUS;
+			}
+		});
+		
+		etsd.open();
+		
+		Object[] results = etsd.getResult();
+		if (results.length == 1) {
+			if (results[0] instanceof IFile) {
+				return ((IFile)results[0]).getProjectRelativePath().toPortableString();
+			}
+		}
+		
+		return null;
+	}
+
+	protected void checkPage() {
+		String ejbJarXmlFile = ejbJarXmlText.getText();
+		String openEjbJarXmlFile = openEjbJarXmlText.getText();
+		
+		refactoring.setEjbJarXmlFile(ejbJarXmlFile);
+		refactoring.setOpenEjbJarXmlFile(openEjbJarXmlFile);
+		
+		if (refactoring.getProject() == null) {
+			setErrorMessage(null);
+			setPageComplete(true);
+			return;
+		}
+		
+		if (! new File(refactoring.getProject().getLocation().toPortableString() + File.separator + ejbJarXmlFile).exists()) {
+			setErrorMessage("Please select an ejb-jar.xml file");
+			setPageComplete(false);
+			return;
+		} 
+		
+		if (openEjbJarXmlFile  != null && openEjbJarXmlFile.length() > 0) {
+			if (! new File(refactoring.getProject().getLocation().toPortableString() + File.separator + openEjbJarXmlFile).exists()) {
+				setErrorMessage("Please select a valid openejb-jar.xml file");
+				setPageComplete(false);
+				return;
+			} 
+		}
+		
+		setErrorMessage(null);
+		setPageComplete(true);
+	}
+}

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java?rev=609450&r1=609449&r2=609450&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java Sun Jan  6 14:35:31 2008
@@ -17,13 +17,17 @@
 
 package org.apache.openejb.helper.annotation.wizards;
 
+import org.apache.openejb.helper.annotation.ConversionException;
 import org.apache.openejb.helper.annotation.JavaProjectAnnotationFacade;
 import org.apache.openejb.helper.annotation.OpenEjbXmlConverter;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.Refactoring;
 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
@@ -34,54 +38,73 @@
 	protected String ejbJarXmlFile;
 	protected String openEjbJarXmlFile;
 	protected IProject project;
-	protected RefactoringStatus status = new RefactoringStatus();
+	protected RefactoringStatus status;
+	private final IWorkspaceRoot workspaceRoot;
 	
-	@Override
-	public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
-		
-	
-			throws CoreException, OperationCanceledException {
-
-		status = new RefactoringStatus();
-		
-		return status;
+	public EJBMigrationRefactoring(IWorkspaceRoot workspaceRoot) {
+		this.workspaceRoot = workspaceRoot;
+		this.status = new RefactoringStatus();
 	}
 
 	@Override
-	public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
-			throws CoreException, OperationCanceledException {
-
+	public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
+		status = new RefactoringStatus();
+		
 		if (ejbJarXmlFile == null || ejbJarXmlFile.length() == 0) {
-			return RefactoringStatus.createErrorStatus("No ejb-jar.xml specified");
+			status.addError("No ejb-jar.xml specified");
 		}
 
 		IFile file = project.getFile(ejbJarXmlFile);
 		if (! (file.exists())) {
-			return RefactoringStatus.createErrorStatus("Specified ejb-jar.xml does not exist");
+			status.addError("Specified ejb-jar.xml does not exist");
 		}
+
 		
+		return status;
+	}
+
+	@Override
+	public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
 		return new RefactoringStatus();
 	}
 
 	@Override
-	public Change createChange(IProgressMonitor pm) throws CoreException,
-			OperationCanceledException {
-		
-		IFile file = project.getFile(ejbJarXmlFile);
-		if (! (file.exists())) {
-			return null;
-		}
+	public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
+		try {
+			InputSource ejbJarInputSource = null;
+			InputSource openEjbJarInputSource = null;
+			
+			if (ejbJarXmlFile != null && ejbJarXmlFile.length() > 0) {
+				IFile ejbJarFile = project.getFile(ejbJarXmlFile);
+				if (!(ejbJarFile.exists())) {
+					return null;
+				}
+
+				ejbJarInputSource = new InputSource(ejbJarFile.getContents());
+			}
+			
+			if (openEjbJarXmlFile != null && openEjbJarXmlFile.length() > 0) {
+				IFile openEjbJarFile = project.getFile(openEjbJarXmlFile);
+				if (openEjbJarFile.exists()) {
+					openEjbJarInputSource = new InputSource(openEjbJarFile.getContents());
+				}
+			}
+			
+			JavaProjectAnnotationFacade annotationFacade = new JavaProjectAnnotationFacade(project);
+			OpenEjbXmlConverter converter = new OpenEjbXmlConverter(annotationFacade);
+			
+			converter.convert(ejbJarInputSource, openEjbJarInputSource);
+
+			String[] warnings = annotationFacade.getWarnings();
+			for (String warning : warnings) {
+				status.addWarning(warning);
+			}
 
-		JavaProjectAnnotationFacade annotationFacade = new JavaProjectAnnotationFacade(project);
-		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(annotationFacade);
-		converter.convert(new InputSource(file.getContents()));
-		
-		String[] warnings = annotationFacade.getWarnings();
-		for (String warning : warnings) {
-			status.addWarning(warning);
+			return annotationFacade.getChange();
+
+		} catch (ConversionException e) {
+			throw new CoreException(new Status(IStatus.ERROR, "org.apache.openejb.helper.annotation", e.getMessage()));
 		}
-		
-		return annotationFacade.getChange();
 	}
 
 	@Override
@@ -90,6 +113,9 @@
 	}
 
 	public String getEjbJarXmlFile() {
+		if (ejbJarXmlFile == null)
+			ejbJarXmlFile = "";
+		
 		return ejbJarXmlFile;
 	}
 
@@ -98,6 +124,9 @@
 	}
 
 	public String getOpenEjbJarXmlFile() {
+		if (openEjbJarXmlFile == null)
+			openEjbJarXmlFile = "";
+		
 		return openEjbJarXmlFile;
 	}
 
@@ -111,5 +140,9 @@
 
 	public void setProject(IProject project) {
 		this.project = project;
+	}
+
+	public IWorkspaceRoot getWorkspaceRoot() {
+		return workspaceRoot;
 	}
 }



Mime
View raw message