You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2011/11/17 03:19:27 UTC
svn commit: r1203020 [23/29] - in
/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1: eclipse/
plugins/org.apache.geronimo.j2ee.v11.jaxbmodel/
plugins/org.apache.geronimo.j2ee.v11.jaxbmodel/src/test/resources/application/
plugins/org.apache.geronimo...
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServiceRefWizard.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServiceRefWizard.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServiceRefWizard.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/plugin.xml?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/plugin.xml Thu Nov 17 02:19:12 2011
@@ -17,7 +17,7 @@
~ limitations under the License.
-->
-<!-- $Rev: 694463 $ $Date: 2008-09-11 16:34:54 -0400 (Thu, 11 Sep 2008) $ -->
+<!-- $Rev$ $Date$ -->
<plugin>
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/plugin.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/plugin.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/plugin.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/pom.xml?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/pom.xml Thu Nov 17 02:19:12 2011
@@ -14,7 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!-- $Rev: 697956 $ $Date: 2008-09-22 15:29:47 -0400 (Mon, 22 Sep 2008) $ -->
+<!-- $Rev$ $Date$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/Activator.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/Activator.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/Activator.java Thu Nov 17 02:19:12 2011
@@ -1,127 +1,127 @@
-/*
- * 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.geronimo.st.v22.core;
-
-import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
-import org.apache.geronimo.st.core.ModuleArtifactMapper;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerLifecycleListener;
-import org.eclipse.wst.server.core.ServerCore;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * @version $Rev: 499184 $ $Date: 2007-01-23 18:36:18 -0500 (Tue, 23 Jan 2007) $
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.apache.geronimo.st.v22.core";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- ServerCore.addServerLifecycleListener(new IServerLifecycleListener() {
- public void serverAdded(IServer server) {
- triggerStartUpdateServerTask(server);
- }
-
- public void serverChanged(IServer server) {
-
- }
-
- public void serverRemoved(IServer server) {
- }
- });
- IServer[] servers = ServerCore.getServers();
- for(int i = 0; i < servers.length; i++) {
- triggerStartUpdateServerTask(servers[i]);
- }
- }
-
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * <b>triggerStartUpdateServerTask</b> is invoked from:
- * <ul>
- * <li>The WTP ResourceManager after a new server has been defined (via the WTP NewServerWizard)
- * <li>When a server lifecycle listener has been added (see above)
- * </ul>
- *
- * @param server
- */
- private void triggerStartUpdateServerTask(IServer server) {
- GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) server.getAdapter(GeronimoServerBehaviourDelegate.class);
- if (delegate == null) {
- delegate = (GeronimoServerBehaviourDelegate) server.loadAdapter(GeronimoServerBehaviourDelegate.class, null);
- }
- if (delegate != null) {
- delegate.startUpdateServerStateTask();
- }
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- IServer[] servers = ServerCore.getServers();
- for(int i = 0; i < servers.length; i++) {
- GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) servers[i].getAdapter(GeronimoServerBehaviourDelegate.class);
- if(delegate != null) {
- delegate.stopUpdateServerStateTask();
- }
- }
- ModuleArtifactMapper.getInstance().save();
- super.stop(context);
- plugin = null;
- }
-
- public static void log(int severity, String message, Throwable throwable) {
- plugin.getLog().log(new Status(severity, PLUGIN_ID, 0, message, throwable));
-
- }
-
-}
+/*
+ * 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.geronimo.st.v22.core;
+
+import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
+import org.apache.geronimo.st.core.ModuleArtifactMapper;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerLifecycleListener;
+import org.eclipse.wst.server.core.ServerCore;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @version $Rev$ $Date$
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.apache.geronimo.st.v22.core";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+
+ ServerCore.addServerLifecycleListener(new IServerLifecycleListener() {
+ public void serverAdded(IServer server) {
+ triggerStartUpdateServerTask(server);
+ }
+
+ public void serverChanged(IServer server) {
+
+ }
+
+ public void serverRemoved(IServer server) {
+ }
+ });
+ IServer[] servers = ServerCore.getServers();
+ for(int i = 0; i < servers.length; i++) {
+ triggerStartUpdateServerTask(servers[i]);
+ }
+ }
+
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * <b>triggerStartUpdateServerTask</b> is invoked from:
+ * <ul>
+ * <li>The WTP ResourceManager after a new server has been defined (via the WTP NewServerWizard)
+ * <li>When a server lifecycle listener has been added (see above)
+ * </ul>
+ *
+ * @param server
+ */
+ private void triggerStartUpdateServerTask(IServer server) {
+ GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) server.getAdapter(GeronimoServerBehaviourDelegate.class);
+ if (delegate == null) {
+ delegate = (GeronimoServerBehaviourDelegate) server.loadAdapter(GeronimoServerBehaviourDelegate.class, null);
+ }
+ if (delegate != null) {
+ delegate.startUpdateServerStateTask();
+ }
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ IServer[] servers = ServerCore.getServers();
+ for(int i = 0; i < servers.length; i++) {
+ GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) servers[i].getAdapter(GeronimoServerBehaviourDelegate.class);
+ if(delegate != null) {
+ delegate.stopUpdateServerStateTask();
+ }
+ }
+ ModuleArtifactMapper.getInstance().save();
+ super.stop(context);
+ plugin = null;
+ }
+
+ public static void log(int severity, String message, Throwable throwable) {
+ plugin.getLog().log(new Status(severity, PLUGIN_ID, 0, message, throwable));
+
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/Activator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/Activator.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/Activator.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServerBehaviour.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServerBehaviour.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServerBehaviour.java Thu Nov 17 02:19:12 2011
@@ -1,234 +1,234 @@
-/*
- * 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.geronimo.st.v22.core;
-
-import java.net.URL;
-import java.util.List;
-import java.util.Set;
-
-import javax.management.MBeanServerConnection;
-import javax.naming.directory.NoSuchAttributeException;
-
-import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.AbstractNameQuery;
-import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.InternalKernelException;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.config.Configuration;
-import org.apache.geronimo.kernel.config.InvalidConfigException;
-import org.apache.geronimo.kernel.config.PersistentConfigurationList;
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
-import org.apache.geronimo.st.v21.core.internal.DependencyHelper;
-import org.apache.geronimo.st.v22.core.internal.Trace;
-import org.apache.geronimo.system.jmx.KernelDelegate;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.IModulePublishHelper;
-import org.apache.geronimo.st.v21.core.Activator;
-/**
- * @version $Rev: 540136 $ $Date: 2007-05-21 09:15:31 -0400 (Mon, 21 May 2007) $
- */
-public class GeronimoServerBehaviour extends GeronimoServerBehaviourDelegate implements IModulePublishHelper {
-
- private Kernel kernel = null;
-
- public GeronimoServerBehaviour() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate#stopKernel()
- */
- protected void stopKernel() {
- if (kernel != null) {
- kernel.shutdown();
- kernel = null;
- }
- }
-
- /**
- * @return
- * @throws SecurityException
- */
- protected Kernel getKernel() throws SecurityException {
- if (kernel == null) {
- try {
- MBeanServerConnection connection = getServerConnection();
- if (connection != null)
- kernel = new KernelDelegate(connection);
- } catch (SecurityException e) {
- throw e;
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Kernel connection failed. "
- + e.getMessage(), Activator.traceCore);
- }
- }
- return kernel;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.v21.core.IGeronimoServerBehavior#isKernelAlive()
- */
- public boolean isKernelAlive() {
- try {
- return getKernel() != null && kernel.isRunning();
- } catch (SecurityException e) {
- Trace.trace(Trace.ERROR, "Invalid username and/or password.", e, Activator.logCore);
-
- pingThread.interrupt();
- if (getServer().getServerState() != IServer.STATE_STOPPED) {
- forceStopJob(true,e);
-
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Geronimo Server may have been terminated manually outside of workspace.", e, Activator.logCore);
- kernel = null;
- }
- return false;
- }
-
- private void forceStopJob(boolean b, final SecurityException e) {
- /*
- *
- * Currently, there is another Status is returned by StartJob in Server.
- * The message doesn't contain reason for the exception.
- * So this job is created to show a message(Invalid username and/or password) to user.
- *
- * TODO: Need a method to remove the error message thrown by StartJob in Server.
- *
- */
-
- String jobName = NLS.bind(org.eclipse.wst.server.core.internal.Messages.errorStartFailed, getServer().getName());
-
- //This message has different variable names in WTP 3.0 and 3.1, so we define it here instead of using that in WTP
- final String jobStartingName = NLS.bind("Starting {0}", getServer().getName());
-
- new Job(jobName){
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- MultiStatus multiStatus = new MultiStatus(Activator.PLUGIN_ID, 0, jobStartingName, null);
- multiStatus.add(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,"Invalid username and/or password.",e));
- try{
- GeronimoServerBehaviour.this.stop(true);
- }catch (Exception e){
- multiStatus.add(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,"Failed to stop server",e));
- }
-
- return multiStatus;
- }
- }.schedule();
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.v21.core.IGeronimoServerBehavior#isFullyStarted()
- */
- public boolean isFullyStarted() {
- if (isKernelAlive()) {
- AbstractNameQuery query = new AbstractNameQuery(PersistentConfigurationList.class.getName());
- Set configLists = kernel.listGBeans(query);
- if (!configLists.isEmpty()) {
- AbstractName on = (AbstractName) configLists.toArray()[0];
- try {
- Boolean b = (Boolean) kernel.getAttribute(on, "kernelFullyStarted");
- return b.booleanValue();
- } catch (GBeanNotFoundException e) {
- // ignore
- } catch (NoSuchAttributeException e) {
- // ignore
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- Trace.trace(Trace.INFO, "configLists is empty", Activator.traceCore);
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate#getRuntimeClass()
- */
- public String getRuntimeClass() {
- return "org.apache.geronimo.cli.daemon.DaemonCLI";
- }
-
- public IPath getPublishDirectory(IModule[] module) {
- if (module == null || module.length == 0)
- return null;
-
- if (getGeronimoServer().isRunFromWorkspace()) {
- // TODO fix me, see if project root, component root, or output
- // container should be returned
- return module[module.length - 1].getProject().getLocation();
- } else {
- ClassLoader old = Thread.currentThread().getContextClassLoader();
- try {
- Thread.currentThread().setContextClassLoader(getContextClassLoader());
- String configId = getConfigId(module[0]);
- Artifact artifact = Artifact.create(configId);
- AbstractName name = Configuration.getConfigurationAbstractName(artifact);
- GBeanData data = kernel.getGBeanData(name);
- URL url = (URL) data.getAttribute("baseURL");
- return getModulePath(module, url);
- } catch (InvalidConfigException e) {
- e.printStackTrace();
- } catch (GBeanNotFoundException e) {
- e.printStackTrace();
- } catch (InternalKernelException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- Thread.currentThread().setContextClassLoader(old);
- }
- }
-
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.GenericGeronimoServerBehaviour#getContextClassLoader()
- */
- protected ClassLoader getContextClassLoader() {
- return Kernel.class.getClassLoader();
- }
-
- @Override
- protected List getOrderedModules(IServer server, List modules,
- List deltaKind) {
- DependencyHelper dh = new DependencyHelper();
- List list = dh.reorderModules(this.getServer(),modules, deltaKind);
- return list;
- }
+/*
+ * 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.geronimo.st.v22.core;
+
+import java.net.URL;
+import java.util.List;
+import java.util.Set;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.directory.NoSuchAttributeException;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.PersistentConfigurationList;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
+import org.apache.geronimo.st.v21.core.internal.DependencyHelper;
+import org.apache.geronimo.st.v22.core.internal.Trace;
+import org.apache.geronimo.system.jmx.KernelDelegate;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.IModulePublishHelper;
+import org.apache.geronimo.st.v21.core.Activator;
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoServerBehaviour extends GeronimoServerBehaviourDelegate implements IModulePublishHelper {
+
+ private Kernel kernel = null;
+
+ public GeronimoServerBehaviour() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate#stopKernel()
+ */
+ protected void stopKernel() {
+ if (kernel != null) {
+ kernel.shutdown();
+ kernel = null;
+ }
+ }
+
+ /**
+ * @return
+ * @throws SecurityException
+ */
+ protected Kernel getKernel() throws SecurityException {
+ if (kernel == null) {
+ try {
+ MBeanServerConnection connection = getServerConnection();
+ if (connection != null)
+ kernel = new KernelDelegate(connection);
+ } catch (SecurityException e) {
+ throw e;
+ } catch (Exception e) {
+ Trace.trace(Trace.WARNING, "Kernel connection failed. "
+ + e.getMessage(), Activator.traceCore);
+ }
+ }
+ return kernel;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.v21.core.IGeronimoServerBehavior#isKernelAlive()
+ */
+ public boolean isKernelAlive() {
+ try {
+ return getKernel() != null && kernel.isRunning();
+ } catch (SecurityException e) {
+ Trace.trace(Trace.ERROR, "Invalid username and/or password.", e, Activator.logCore);
+
+ pingThread.interrupt();
+ if (getServer().getServerState() != IServer.STATE_STOPPED) {
+ forceStopJob(true,e);
+
+ }
+ } catch (Exception e) {
+ Trace.trace(Trace.WARNING, "Geronimo Server may have been terminated manually outside of workspace.", e, Activator.logCore);
+ kernel = null;
+ }
+ return false;
+ }
+
+ private void forceStopJob(boolean b, final SecurityException e) {
+ /*
+ *
+ * Currently, there is another Status is returned by StartJob in Server.
+ * The message doesn't contain reason for the exception.
+ * So this job is created to show a message(Invalid username and/or password) to user.
+ *
+ * TODO: Need a method to remove the error message thrown by StartJob in Server.
+ *
+ */
+
+ String jobName = NLS.bind(org.eclipse.wst.server.core.internal.Messages.errorStartFailed, getServer().getName());
+
+ //This message has different variable names in WTP 3.0 and 3.1, so we define it here instead of using that in WTP
+ final String jobStartingName = NLS.bind("Starting {0}", getServer().getName());
+
+ new Job(jobName){
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ MultiStatus multiStatus = new MultiStatus(Activator.PLUGIN_ID, 0, jobStartingName, null);
+ multiStatus.add(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,"Invalid username and/or password.",e));
+ try{
+ GeronimoServerBehaviour.this.stop(true);
+ }catch (Exception e){
+ multiStatus.add(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,"Failed to stop server",e));
+ }
+
+ return multiStatus;
+ }
+ }.schedule();
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.v21.core.IGeronimoServerBehavior#isFullyStarted()
+ */
+ public boolean isFullyStarted() {
+ if (isKernelAlive()) {
+ AbstractNameQuery query = new AbstractNameQuery(PersistentConfigurationList.class.getName());
+ Set configLists = kernel.listGBeans(query);
+ if (!configLists.isEmpty()) {
+ AbstractName on = (AbstractName) configLists.toArray()[0];
+ try {
+ Boolean b = (Boolean) kernel.getAttribute(on, "kernelFullyStarted");
+ return b.booleanValue();
+ } catch (GBeanNotFoundException e) {
+ // ignore
+ } catch (NoSuchAttributeException e) {
+ // ignore
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else {
+ Trace.trace(Trace.INFO, "configLists is empty", Activator.traceCore);
+ }
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate#getRuntimeClass()
+ */
+ public String getRuntimeClass() {
+ return "org.apache.geronimo.cli.daemon.DaemonCLI";
+ }
+
+ public IPath getPublishDirectory(IModule[] module) {
+ if (module == null || module.length == 0)
+ return null;
+
+ if (getGeronimoServer().isRunFromWorkspace()) {
+ // TODO fix me, see if project root, component root, or output
+ // container should be returned
+ return module[module.length - 1].getProject().getLocation();
+ } else {
+ ClassLoader old = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getContextClassLoader());
+ String configId = getConfigId(module[0]);
+ Artifact artifact = Artifact.create(configId);
+ AbstractName name = Configuration.getConfigurationAbstractName(artifact);
+ GBeanData data = kernel.getGBeanData(name);
+ URL url = (URL) data.getAttribute("baseURL");
+ return getModulePath(module, url);
+ } catch (InvalidConfigException e) {
+ e.printStackTrace();
+ } catch (GBeanNotFoundException e) {
+ e.printStackTrace();
+ } catch (InternalKernelException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ Thread.currentThread().setContextClassLoader(old);
+ }
+ }
+
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.GenericGeronimoServerBehaviour#getContextClassLoader()
+ */
+ protected ClassLoader getContextClassLoader() {
+ return Kernel.class.getClassLoader();
+ }
+
+ @Override
+ protected List getOrderedModules(IServer server, List modules,
+ List deltaKind) {
+ DependencyHelper dh = new DependencyHelper();
+ List list = dh.reorderModules(this.getServer(),modules, deltaKind);
+ return list;
+ }
}
\ No newline at end of file
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServerBehaviour.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServerBehaviour.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServerBehaviour.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22ServerInfo.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22ServerInfo.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22ServerInfo.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22ServerInfo.java Thu Nov 17 02:19:12 2011
@@ -53,7 +53,7 @@ import org.eclipse.wst.server.core.IServ
import org.eclipse.wst.server.core.ServerCore;
/**
- * @version $Rev: 952535 $ $Date: 2010-06-08 12:40:16 +0800 (Tue, 08 Jun 2010) $
+ * @version $Rev$ $Date$
*/
public class GeronimoV22ServerInfo implements IGeronimoServerInfo{
static final long serialVersionUID = 1L;
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22ServerInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22ServerInfo.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22ServerInfo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22VersionHandler.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22VersionHandler.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22VersionHandler.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22VersionHandler.java Thu Nov 17 02:19:12 2011
@@ -1,46 +1,46 @@
-/*
- * 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.geronimo.st.v22.core;
-
-import javax.enterprise.deploy.spi.TargetModuleID;
-
-import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
-import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
-import org.apache.geronimo.st.core.IGeronimoVersionHandler;
-import org.eclipse.wst.server.core.IModule;
-
-/**
- * @version $Rev: 513891 $ $Date: 2007-03-02 14:09:25 -0500 (Fri, 02 Mar 2007) $
- */
-public class GeronimoV22VersionHandler implements IGeronimoVersionHandler {
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#getConfigID(org.eclipse.wst.server.core.IModule)
- */
- public String getConfigID(IModule module) throws Exception {
- return GeronimoV21Utils.getConfigId(module);
- }
-
- /* (non-Javadoc)
- * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#createTargetModuleId(java.lang.String)
- */
- public TargetModuleID createTargetModuleId(String configId) {
- return new TargetModuleIDImpl(null, configId);
- }
-}
+/*
+ * 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.geronimo.st.v22.core;
+
+import javax.enterprise.deploy.spi.TargetModuleID;
+
+import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
+import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
+import org.apache.geronimo.st.core.IGeronimoVersionHandler;
+import org.eclipse.wst.server.core.IModule;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoV22VersionHandler implements IGeronimoVersionHandler {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#getConfigID(org.eclipse.wst.server.core.IModule)
+ */
+ public String getConfigID(IModule module) throws Exception {
+ return GeronimoV21Utils.getConfigId(module);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#createTargetModuleId(java.lang.String)
+ */
+ public TargetModuleID createTargetModuleId(String configId) {
+ return new TargetModuleIDImpl(null, configId);
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22VersionHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22VersionHandler.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoV22VersionHandler.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/internal/Trace.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/internal/Trace.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/internal/Trace.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/internal/Trace.java Thu Nov 17 02:19:12 2011
@@ -1,125 +1,125 @@
-/*
- * 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.geronimo.st.v22.core.internal;
-
-import org.apache.geronimo.runtime.common.log.Logger;
-import org.apache.geronimo.st.v21.core.Activator;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Helper class to route trace output.
- *
- * @version $Rev: 589873 $ $Date: 2007-10-29 17:48:35 -0400 (Mon, 29 Oct 2007) $
- */
-public class Trace {
-
- /**
- * Finest trace event.
- */
- public static int INFO = 1;
-
- /**
- * Warning trace event.
- */
- public static int WARNING = 2;
-
- /**
- * error trace event.
- */
- public static int ERROR = 4;
- /**
- * cancel trace event.
- */
- public static int CANCEL = 8;
-
- /**
- * Trace constructor comment.
- */
- private static Logger log;
- static {
- log = Logger.getInstance();
- }
- private Trace() {
- super();
- }
-
- /**
- * Trace the given text.
- *
- * @param level
- * the trace level
- * @param s
- * a message
- */
- public static void trace(int level, String s, boolean opt) {
- trace(level, s, null, opt);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param level
- * the trace level
- * @param s
- * a message
- * @param t
- * a throwable
- */
- public static void trace(int level, String s, Throwable t, boolean opt) {
- if (Activator.getDefault() == null || !Activator.getDefault().isDebugging())
- return;
- if(opt) {
- log.trace(level, Activator.PLUGIN_ID, s, t);
- }
- if(Activator.console) {
- System.out.println(Activator.PLUGIN_ID + ": " + s);
- if (t != null)
- t.printStackTrace();
- }
- }
-
- /**
- * Trace the given message
- *
- * @param tracePoint
- * The trace point (e.g., "Exit", "Entry", "Constructor", etc....
- *
- * @param classDotMethod
- * The class name + method name (e.g., "Class.method()")
- *
- * @param parms
- * Method parameter(s) if the trace point is an "Entry"
- * or
- * Return value if the trace point is an "Exit"
- */
- public static void tracePoint(String tracePoint, String classDotMethod, boolean opt) {
- trace(Trace.INFO, tracePoint + ": " + classDotMethod + "()", opt);
- }
- public static void tracePoint(String tracePoint, boolean opt, String classDotMethod, Object... parms) {
- if ( parms == null ) {
- trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( null )" , opt);
- }
- else {
- trace(Trace.INFO, tracePoint + ": " + classDotMethod + "(" , opt);
- for ( int ii=0; ii<parms.length; ii++) {
- Object parm = parms[ii];
- trace(Trace.INFO, " parm" + (ii+1) + "=[" + (parm == null ? null : parm.toString()) + "]" , opt);
- }
- trace(Trace.INFO, ")" ,opt);
- }
- }
-}
+/*
+ * 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.geronimo.st.v22.core.internal;
+
+import org.apache.geronimo.runtime.common.log.Logger;
+import org.apache.geronimo.st.v21.core.Activator;
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * Helper class to route trace output.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Trace {
+
+ /**
+ * Finest trace event.
+ */
+ public static int INFO = 1;
+
+ /**
+ * Warning trace event.
+ */
+ public static int WARNING = 2;
+
+ /**
+ * error trace event.
+ */
+ public static int ERROR = 4;
+ /**
+ * cancel trace event.
+ */
+ public static int CANCEL = 8;
+
+ /**
+ * Trace constructor comment.
+ */
+ private static Logger log;
+ static {
+ log = Logger.getInstance();
+ }
+ private Trace() {
+ super();
+ }
+
+ /**
+ * Trace the given text.
+ *
+ * @param level
+ * the trace level
+ * @param s
+ * a message
+ */
+ public static void trace(int level, String s, boolean opt) {
+ trace(level, s, null, opt);
+ }
+
+ /**
+ * Trace the given message and exception.
+ *
+ * @param level
+ * the trace level
+ * @param s
+ * a message
+ * @param t
+ * a throwable
+ */
+ public static void trace(int level, String s, Throwable t, boolean opt) {
+ if (Activator.getDefault() == null || !Activator.getDefault().isDebugging())
+ return;
+ if(opt) {
+ log.trace(level, Activator.PLUGIN_ID, s, t);
+ }
+ if(Activator.console) {
+ System.out.println(Activator.PLUGIN_ID + ": " + s);
+ if (t != null)
+ t.printStackTrace();
+ }
+ }
+
+ /**
+ * Trace the given message
+ *
+ * @param tracePoint
+ * The trace point (e.g., "Exit", "Entry", "Constructor", etc....
+ *
+ * @param classDotMethod
+ * The class name + method name (e.g., "Class.method()")
+ *
+ * @param parms
+ * Method parameter(s) if the trace point is an "Entry"
+ * or
+ * Return value if the trace point is an "Exit"
+ */
+ public static void tracePoint(String tracePoint, String classDotMethod, boolean opt) {
+ trace(Trace.INFO, tracePoint + ": " + classDotMethod + "()", opt);
+ }
+ public static void tracePoint(String tracePoint, boolean opt, String classDotMethod, Object... parms) {
+ if ( parms == null ) {
+ trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( null )" , opt);
+ }
+ else {
+ trace(Trace.INFO, tracePoint + ": " + classDotMethod + "(" , opt);
+ for ( int ii=0; ii<parms.length; ii++) {
+ Object parm = parms[ii];
+ trace(Trace.INFO, " parm" + (ii+1) + "=[" + (parm == null ? null : parm.toString()) + "]" , opt);
+ }
+ trace(Trace.INFO, ")" ,opt);
+ }
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/internal/Trace.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/internal/Trace.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/internal/Trace.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/plugin/JAXB22PluginUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/plugin/JAXB22PluginUtils.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/plugin/JAXB22PluginUtils.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/plugin.xml?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/plugin.xml Thu Nov 17 02:19:12 2011
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
- ~ 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.
- -->
-
-<!-- $Rev: 570837 $ $Date: 2007-08-29 11:25:39 -0400 (Wed, 29 Aug 2007) $ -->
-
-<plugin>
-
- <extension point="org.apache.geronimo.st.ui.loader">
- <loader class="org.apache.geronimo.st.v21.ui.editors.GeronimoFormContentLoader" version="2.2"/>
- </extension>
-
- <!--
- |
- | Map the action defined for the "Geronimo Deployment" project-facet to a specific class
- |
- -->
- <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
- <wizard-pages action="geronimo.plan.install.v22">
- <page class="org.apache.geronimo.st.v21.ui.wizards.FacetInstallPage"/>
- </wizard-pages>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!--
+ ~ 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.
+ -->
+
+<!-- $Rev$ $Date$ -->
+
+<plugin>
+
+ <extension point="org.apache.geronimo.st.ui.loader">
+ <loader class="org.apache.geronimo.st.v21.ui.editors.GeronimoFormContentLoader" version="2.2"/>
+ </extension>
+
+ <!--
+ |
+ | Map the action defined for the "Geronimo Deployment" project-facet to a specific class
+ |
+ -->
+ <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+ <wizard-pages action="geronimo.plan.install.v22">
+ <page class="org.apache.geronimo.st.v21.ui.wizards.FacetInstallPage"/>
+ </wizard-pages>
+ </extension>
+
+</plugin>
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/plugin.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/plugin.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/plugin.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/pom.xml?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/pom.xml Thu Nov 17 02:19:12 2011
@@ -14,7 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!-- $Rev: 581072 $ $Date: 2007-10-01 17:11:46 -0400 (Mon, 01 Oct 2007) $ -->
+<!-- $Rev$ $Date$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v22.ui/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml