Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-02-23 17:47:57 +0000
committerChristopher Frost2012-02-23 17:47:57 +0000
commit4bc0e1c36ba87e8d3f6f907fc0dafceb3beebde8 (patch)
treea0dcdcc922096741a87eac1a0c9cbd99472fc44b /org.eclipse.virgo.management.fragment
parentc1aac7031c065704d2cbba34aba898b072452db6 (diff)
downloadorg.eclipse.virgo.kernel-4bc0e1c36ba87e8d3f6f907fc0dafceb3beebde8.tar.gz
org.eclipse.virgo.kernel-4bc0e1c36ba87e8d3f6f907fc0dafceb3beebde8.tar.xz
org.eclipse.virgo.kernel-4bc0e1c36ba87e8d3f6f907fc0dafceb3beebde8.zip
368157 Fixes for the build to apply the fragments to both regions
Diffstat (limited to 'org.eclipse.virgo.management.fragment')
-rw-r--r--org.eclipse.virgo.management.fragment/.classpath29
-rw-r--r--org.eclipse.virgo.management.fragment/.project41
-rw-r--r--org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs3
-rw-r--r--org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml4
-rw-r--r--org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs3
-rw-r--r--org.eclipse.virgo.management.fragment/build.xml9
-rw-r--r--org.eclipse.virgo.management.fragment/ivy.xml21
-rw-r--r--org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java44
-rw-r--r--org.eclipse.virgo.management.fragment/src/test/java/.gitignore0
-rw-r--r--org.eclipse.virgo.management.fragment/src/test/resources/.gitignore0
-rw-r--r--org.eclipse.virgo.management.fragment/template.mf12
11 files changed, 166 insertions, 0 deletions
diff --git a/org.eclipse.virgo.management.fragment/.classpath b/org.eclipse.virgo.management.fragment/.classpath
new file mode 100644
index 00000000..7be8ef40
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/.classpath
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="src/main/resources">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.0.200809221524/org.eclipse.osgi-3.5.0.200809221524.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.agent.dm"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.management/1.0.0.RELEASE/org.eclipse.gemini.management-1.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.region/1.0.0.v20110503/org.eclipse.equinox.region-1.0.0.v20110503.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.region/1.0.0.v20110503/org.eclipse.equinox.region-1.0.0.v20110503.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.virgo.management.fragment/.project b/org.eclipse.virgo.management.fragment/.project
new file mode 100644
index 00000000..3074e823
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/.project
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.kernel.management.fragment</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.springsource.server.ide.bundlor.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>com.springsource.server.dev.eclipse.serverdevelopmentnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs b/org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs
new file mode 100644
index 00000000..61ee8a9b
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 06 09:06:52 BST 2009
+com.springsource.server.ide.bundlor.core.template.properties.files=../build.properties;../build.versions
+eclipse.preferences.version=1
diff --git a/org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml b/org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 00000000..92aa2909
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
+</faceted-project>
diff --git a/org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs b/org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs
new file mode 100644
index 00000000..e68da314
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 06 16:49:15 BST 2009
+eclipse.preferences.version=1
+org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false
diff --git a/org.eclipse.virgo.management.fragment/build.xml b/org.eclipse.virgo.management.fragment/build.xml
new file mode 100644
index 00000000..aaabed2e
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.virgo.management.fragment">
+
+ <property name="clover.enforce" value="false"/>
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../build.versions"/>
+ <import file="${basedir}/../virgo-build/standard/default.xml"/>
+
+</project>
diff --git a/org.eclipse.virgo.management.fragment/ivy.xml b/org.eclipse.virgo.management.fragment/ivy.xml
new file mode 100644
index 00000000..45d2c140
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/ivy.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" version="2.0">
+
+ <info organisation="org.eclipse.virgo" module="${ant.project.name}"/>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.eclipse.gemini" name="org.eclipse.gemini.management" rev="${org.eclipse.gemini.management}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.region" rev="${org.eclipse.equinox.region}" conf="compile->runtime" />
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java b/org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java
new file mode 100644
index 00000000..1ddba27e
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2011 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.management.fragment;
+
+import java.util.Hashtable;
+
+import javax.management.ObjectName;
+
+import org.eclipse.equinox.region.RegionDigraph;
+import org.eclipse.gemini.mgmt.ObjectNameTranslator;
+
+public class VirgoObjectNameTranslator implements ObjectNameTranslator{
+
+ private static final String REGION_KEY = "region";
+
+ private final RegionDigraph regionDigraph;
+
+ public VirgoObjectNameTranslator(RegionDigraph regionDigraph) {
+ this.regionDigraph = regionDigraph;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ObjectName translate(ObjectName originalName) {
+ Hashtable<String, String> keyPropertyList = originalName.getKeyPropertyList();
+ keyPropertyList.put(REGION_KEY, this.regionDigraph.getRegion(7l).getName());
+ try {
+ return new ObjectName(originalName.getDomain(), keyPropertyList);
+ } catch (Exception e) {
+ throw new RuntimeException("Error modifying ObjectName for '" + originalName.getCanonicalName() + "'", e);
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.management.fragment/src/test/java/.gitignore b/org.eclipse.virgo.management.fragment/src/test/java/.gitignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/src/test/java/.gitignore
diff --git a/org.eclipse.virgo.management.fragment/src/test/resources/.gitignore b/org.eclipse.virgo.management.fragment/src/test/resources/.gitignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/src/test/resources/.gitignore
diff --git a/org.eclipse.virgo.management.fragment/template.mf b/org.eclipse.virgo.management.fragment/template.mf
new file mode 100644
index 00000000..8aeb8148
--- /dev/null
+++ b/org.eclipse.virgo.management.fragment/template.mf
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Virgo Management Fragment
+Fragment-Host: org.eclipse.gemini.mgmt;bundle-version="${org.eclipse.gemini.management:[=.=.=, =.+1)}"
+Bundle-SymbolicName: org.eclipse.virgo.management.fragment
+Bundle-Version: ${version}
+GeminiManagement-ObjectNameTranslator: org.eclipse.virgo.management.fragment.VirgoObjectNameTranslator
+Import-Package:
+ org.eclipse.equinox.region;version="${org.eclipse.equinox.region:[=.=.=, =.+1)}",
+ javax.management;version="0"
+Excluded-Imports: org.eclipse.gemini.mgmt
+Excluded-Exports: *

Back to the top