tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject svn commit: r702284 - in /openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server: OpenEJBRuntimeClasspathProviderDelegate.java OpenEJBRuntimeDelegate.java OpenEJBRuntimeFragment.java
Date Mon, 06 Oct 2008 21:48:03 GMT
Author: jgallimore
Date: Mon Oct  6 14:48:03 2008
New Revision: 702284

URL: http://svn.apache.org/viewvc?rev=702284&view=rev
Log:
OEP-21 - now using all jars in openejb/lib removed option to include ejb-3.1 jar

Modified:
    openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeClasspathProviderDelegate.java
    openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeDelegate.java
    openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeFragment.java

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeClasspathProviderDelegate.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeClasspathProviderDelegate.java?rev=702284&r1=702283&r2=702284&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeClasspathProviderDelegate.java
(original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeClasspathProviderDelegate.java
Mon Oct  6 14:48:03 2008
@@ -46,11 +46,10 @@
 	@Override
 	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime) {
 		IPath installPath = runtime.getLocation();
-		boolean ejb31JarIncluded = getRuntimeDelegate(runtime).isEjb31JarIncluded();
 		if (installPath == null)
 			return new IClasspathEntry[0];
 		
-		List<IClasspathEntry> list = getClientJars(installPath, ejb31JarIncluded);
+		List<IClasspathEntry> list = getClientJars(installPath);
 		return (IClasspathEntry[])list.toArray(new IClasspathEntry[0]);
 	}
 
@@ -64,7 +63,7 @@
 		return resolveClasspathContainer(runtime);
 	}
 
-	private List<IClasspathEntry> getClientJars(IPath installPath, boolean includeEjb31Jar)
{
+	private List<IClasspathEntry> getClientJars(IPath installPath) {
 		File libFolder = new File(installPath.toString() + File.separator + "lib");
 		if (! libFolder.exists()) {
 			return null;
@@ -74,12 +73,8 @@
 		File[] files = libFolder.listFiles();
 		
 		for (File file : files) {
-			if ((file.getName().startsWith("javaee-api") && file.getName().endsWith(".jar"))
-					|| (file.getName().startsWith("openejb-client") && file.getName().endsWith(".jar"))
-					|| (includeEjb31Jar && file.getName().startsWith("ejb31-api-experimental") &&
file.getName().endsWith(".jar"))) {
-				Path jar = new Path(file.getAbsolutePath());
-				classpathEntries.add(JavaCore.newLibraryEntry(jar, null, null));
-			}
+			Path jar = new Path(file.getAbsolutePath());
+			classpathEntries.add(JavaCore.newLibraryEntry(jar, null, null));
 		}
 		
 		return classpathEntries;

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeDelegate.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeDelegate.java?rev=702284&r1=702283&r2=702284&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeDelegate.java
(original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeDelegate.java
Mon Oct  6 14:48:03 2008
@@ -135,17 +135,4 @@
 	public String getVMInstallId() {
 		return getAttribute(PROP_VM_INSTALL_ID, (String)null);
 	}
-
-	public void setEjb31JarIncluded(boolean selection) {
-		setAttribute(INCLUDE_EJB31_JARS, Boolean.toString(selection));
-	}
-
-	public boolean isEjb31JarIncluded() {
-		try {
-			return Boolean.parseBoolean(getAttribute(INCLUDE_EJB31_JARS, "false"));
-		} catch (Exception e) {
-		}
-		
-		return false;
-	}
 }

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeFragment.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeFragment.java?rev=702284&r1=702283&r2=702284&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeFragment.java
(original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/OpenEJBRuntimeFragment.java
Mon Oct  6 14:48:03 2008
@@ -47,7 +47,6 @@
 public class OpenEJBRuntimeFragment extends WizardFragment {
 
 	private IWizardHandle handle;
-	private Button includeEjb31Button;
 
 	@Override
 	public boolean hasComposite() {
@@ -103,23 +102,6 @@
 			}
 		});
 
-		Label ejb31Label = new Label(composite, SWT.NONE);
-		ejb31Label.setText("Include experimental EJB 3.1 Jars in classpath");
-		
-		includeEjb31Button = new Button(composite, SWT.CHECK);
-		
-		try {
-			includeEjb31Button.setSelection(getRuntimeDelegate().isEjb31JarIncluded());
-		} catch (Exception e) {
-		}
-		
-		includeEjb31Button.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				getRuntimeDelegate().setEjb31JarIncluded(includeEjb31Button.getSelection());
-				validate();
-			}
-		});
-		
 		try {
 			validate();
 		} catch (Exception e) {
@@ -142,8 +124,6 @@
 		File installationDirectory = getRuntimeDelegate().getRuntimeWorkingCopy().getLocation().toFile();
 		if (! installationDirectory.exists()) {
 			handle.setMessage("Directory does not exist", IMessageProvider.ERROR);
-			includeEjb31Button.setEnabled(false);
-			includeEjb31Button.setSelection(false);
 			return;
 		}
 		
@@ -154,23 +134,6 @@
 		}
 		
 		handle.setMessage("", IMessageProvider.NONE);
-		includeEjb31Button.setEnabled(installationFolderHasEjb31Jar(installationDirectory));
-	}
-
-	private boolean installationFolderHasEjb31Jar(File installationDirectory) {
-		File libDirectory = new File(installationDirectory.getAbsolutePath() + File.separator +
"lib");
-		if (! libDirectory.exists()) {
-			return false;
-		}
-		
-		File[] files = libDirectory.listFiles();
-		for (File file : files) {
-			if (file.getName().startsWith("ejb31-api-experimental") && file.getName().endsWith(".jar"))
{
-				return true;
-			}
-		}
-		
-		return false;
 	}
 
 	@Override



Mime
View raw message