.classpath
| 21
dev/null
|binary
etc/agentspawn/pom.xml
| 8
etc/classloaders-test/plugin1/pom.xml
| 8
etc/classloaders-test/plugin2/pom.xml
| 7
etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
| 16
etc/samples/custom-serverplugin/pom.xml
| 7
etc/samples/simplereport-serverplugin/pom.xml
| 8
etc/samples/skeleton-plugin/pom.xml
| 8
modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
| 12
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
| 7
modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
| 34
modules/enterprise/agent/ant-run.xml
| 4
modules/enterprise/gui/rest-war/pom.xml
| 7
modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
| 168 +--
modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
| 3
modules/enterprise/scripting/javascript/pom.xml
| 6
modules/enterprise/scripting/python/pom.xml
| 6
modules/enterprise/server/itests-2/pom.xml
| 26
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
| 19
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
| 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
| 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
| 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
| 51
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
| 11
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java
| 38
modules/enterprise/server/xml-schemas/pom.xml
| 7
modules/helpers/pluginAnnotations/pom.xml
| 8
modules/helpers/pluginGen/pom.xml
| 8
modules/helpers/pom.xml
| 10
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
| 9
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
| 138 +-
modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
| 2
modules/integration-tests/jndi-access/jndi-access-test/pom.xml
| 198 +--
modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
| 25
modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
| 12
modules/jopr/LICENSE
| 31
modules/jopr/LICENSE_GPL
| 339 ------
modules/jopr/LICENSE_LGPL
| 504 ---------
modules/jopr/dist/agent/pom.xml
| 111 --
modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml
| 36
modules/jopr/dist/pom.xml
| 23
modules/jopr/dist/server/pom.xml
| 213 ---
modules/jopr/dist/server/src/main/scripts/dist.build.xml
| 68 -
modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml
| 30
modules/jopr/etc/jbas5-ejb-client/client.bat
| 102 -
modules/jopr/etc/jbas5-ejb-client/client.sh
| 86 -
modules/jopr/etc/jbas5-ejb-client/pom.xml
| 280 -----
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java
| 181 ---
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java
| 69 -
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java
| 66 -
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java
| 58 -
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java
| 132 --
modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml
| 54
modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml
| 301 -----
modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh
| 3
modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java
| 182 ---
modules/jopr/etc/jbas5-jnp-client/README
| 16
modules/jopr/etc/jbas5-jnp-client/classpath.txt
| 57 -
modules/jopr/etc/jbas5-jnp-client/client.bat
| 83 -
modules/jopr/etc/jbas5-jnp-client/client.sh
| 87 -
modules/jopr/etc/jbas5-jnp-client/pom.xml
| 212 ---
modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java
| 90 -
modules/jopr/modules-plugins-pom.xml
| 74 -
modules/jopr/modules-pom.xml
| 124 --
modules/jopr/pom.xml
| 49
modules/jopr/release.sh
| 341 ------
modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
| 331 ------
modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java
| 541 ----------
modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java
| 387 -------
modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java
| 43
modules/plugins/JBossOSGi/pom.xml
| 209 ---
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java
| 152 --
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java
| 81 -
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java
| 277 -----
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java
| 132 --
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java
| 106 -
modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml
| 62 -
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
| 22
modules/plugins/hardware/pom.xml
| 10
modules/plugins/hudson/pom.xml
| 8
modules/plugins/irc/pom.xml
| 7
modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
| 6
modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
| 6
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
| 71 +
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
| 8
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
| 2
modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
| 3
modules/plugins/onewire/pom.xml
| 31
modules/plugins/pattern-generator/pom.xml
| 14
modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
| 12
modules/plugins/raw-config-test/pom.xml
| 10
modules/plugins/services/pom.xml
| 12
modules/plugins/snmptrapd/pom.xml
| 7
modules/plugins/twitter/pom.xml
| 12
modules/test-utils/pom.xml
| 11
modules/test-utils/src/main/java/org/rhq/test/PortScout.java
| 69 +
pom.xml
| 18
106 files changed, 658 insertions(+), 6935 deletions(-)
New commits:
commit 5f1390e654c9f95e6a8403bc95d1f2e97b4809e2
Merge: 12f4039 257e056
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Nov 30 09:41:10 2012 -0500
Merge branch 'master' into feature/cassandra-backend
commit 257e056801c29bc241b7c292008326be14faffb9
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Thu Nov 29 14:54:08 2012 +0100
[BZ-871873] Availability check change is not automatically picked up
Set availability schedule data if present in ResourceMeasurementScheduleRequest
diff --git
a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
index 3bb1f99..8e8c399 100644
---
a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
+++
b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
@@ -123,6 +123,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
super(MeasurementAgentService.class);
}
+ @Override
public void initialize() {
LOG.info("Initializing Measurement Manager...");
@@ -167,6 +168,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
}
class MeasurementCollectionRequester implements Runnable {
+ @Override
public void run() {
try {
while (!collectorThreadPool.isShutdown()) {
@@ -288,6 +290,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
}
}
+ @Override
public void shutdown() {
PluginContainer pluginContainer = PluginContainer.getInstance();
@@ -311,6 +314,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
}
}
+ @Override
public void setConfiguration(PluginContainerConfiguration configuration) {
this.configuration = configuration;
}
@@ -324,16 +328,22 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
*
* @param scheduleRequests
*/
+ @Override
public synchronized void
updateCollection(Set<ResourceMeasurementScheduleRequest> scheduleRequests) {
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
for (ResourceMeasurementScheduleRequest resourceRequest : scheduleRequests) {
ResourceContainer resourceContainer =
im.getResourceContainer(resourceRequest.getResourceId());
if (resourceContainer != null) {
-
resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules()); //
this is where we want to update rather than overwrite, right?
-
- //
resourceContainer.setMeasurementSchedule(resourceRequest.getMeasurementSchedules());
+ // Update (not overwrite) measurement schedule data ...
+
resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules());
+ // ... and then reschedule collection
scheduleCollection(resourceRequest.getResourceId(),
resourceRequest.getMeasurementSchedules());
+ if (resourceRequest.getAvailabilitySchedule() != null) {
+ // Set availability schedule data if present
+ // This method also triggers a reschedule of availability check
+
resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
+ }
} else {
// This will happen when the server sends down schedules to an agent with
a cleaned inventory
// Its ok to skip these because the agent will request a reschedule once
its been able to synchronize
@@ -359,16 +369,20 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
*
* @param scheduleRequests
*/
+ @Override
public synchronized void
scheduleCollection(Set<ResourceMeasurementScheduleRequest> scheduleRequests) {
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
for (ResourceMeasurementScheduleRequest resourceRequest : scheduleRequests) {
ResourceContainer resourceContainer =
im.getResourceContainer(resourceRequest.getResourceId());
if (resourceContainer != null) {
- //
resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules());
// this is where we want to update rather than overwrite, right?
+ // Set measurement schedule data ...
resourceContainer.setMeasurementSchedule(resourceRequest.getMeasurementSchedules());
-
resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
+ // ... and then reschedule collection
scheduleCollection(resourceRequest.getResourceId(),
resourceRequest.getMeasurementSchedules());
+ // Set availability schedule data
+ // This method also triggers a reschedule of availability check
+
resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
} else {
// This will happen when the server sends down schedules to an agent with
a cleaned inventory
// It's ok to skip these because the agent will request a reschedule
once its been able to synchronize
@@ -415,6 +429,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
}
}
+ @Override
public synchronized void unscheduleCollection(Set<Integer> resourceIds) {
Iterator<ScheduledMeasurementInfo> itr =
this.scheduledRequests.iterator();
while (itr.hasNext()) {
@@ -442,6 +457,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
// spinder 12/16/11. BZ 760139. Modified to return empty sets instead of
'null' even for erroneous conditions.
// Server side logging or erroneous runtime conditions still occurs, but
callers to getRealTimeMeasurementValues
// won't have to additionally check for null values now. This is a safe
and better pattern.
+ @Override
public Set<MeasurementData> getRealTimeMeasurementValue(int resourceId,
Set<MeasurementScheduleRequest> requests) {
if (requests.size() == 0) {
// There's no need to even call getValues() on the ResourceComponent if
the list of metric names is empty.
@@ -498,6 +514,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
return values;
}
+ @Override
public long getNextExpectedCollectionTime() {
ScheduledMeasurementInfo nextScheduledMeasurement =
this.scheduledRequests.peek();
if (nextScheduledMeasurement == null) {
@@ -629,6 +646,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
return perMinuteValue;
}
+ @Override
public Map<String, Object> getMeasurementScheduleInfoForResource(int
resourceId) {
Map<String, Object> results = null;
@@ -692,10 +710,12 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
// -- MBean monitoring methods
+ @Override
public long getMeasurementsCollected() {
return this.collectedMeasurements.get();
}
+ @Override
public long getMeasurementsCollectedPerMinute() {
long now = System.currentTimeMillis();
@@ -718,14 +738,17 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
return ret;
}
+ @Override
public long getCurrentlyScheduleMeasurements() {
return this.scheduledRequests.size();
}
+ @Override
public long getTotalTimeCollectingMeasurements() {
return this.totalTimeCollecting.get();
}
+ @Override
public long getLateCollections() {
return lateCollections.get();
}
@@ -751,6 +774,7 @@ public class MeasurementManager extends AgentService implements
MeasurementAgent
this.failedCollection.addAndGet(count);
}
+ @Override
public long getFailedCollections() {
return failedCollection.get();
}
commit 62c3c8ee54a41df94f65bb185dc0d12f76ae0c22
Author: Simeon Pinder <spinder(a)fulliautomatix.conchfritter.com>
Date: Thu Nov 29 08:55:48 2012 -0500
[BZ 880795] upgrade augeas library to 0.9.0-4.
diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml
index a765b43..4085efd 100644
--- a/modules/enterprise/agent/ant-run.xml
+++ b/modules/enterprise/agent/ant-run.xml
@@ -12,11 +12,11 @@ Ant Script that provides ways to package the Agent.
<property name="settings.localRepository"
location="${user.home}/.m2/repository"/>
<property name="project.version" value="2.0.0-SNAPSHOT"/>
<property name="sigar.version" value="1.6.5.132-3"/>
- <property name="augeas.version" value="0.9.0"/>
+ <property name="augeas.version" value="0.9.0-4"/>
<property name="augeas.classifier" value="el5"/>
<property name="augeas.zip.location"
value="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}/"/>
<property name="augeas.zip.mask"
value="*-${augeas.classifier}.zip"/>
- <property name="augeas.zip.version" value="0.9.0"/>
+ <property name="augeas.zip.version" value="0.9.0-4"/>
<property name="getopt.version" value="1.0.13"/>
<property name="jaxb-api.version" value="2.1"/>
<property name="jaxb-impl.version" value="2.1"/>
diff --git a/pom.xml b/pom.xml
index 3c844b6..57be9a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,9 +129,9 @@
<twitter4j.version>2.2.4</twitter4j.version>
<commons-codec.version>1.4</commons-codec.version>
<testng.version>6.5.2</testng.version>
- <augeas.version>0.9.0</augeas.version>
+ <augeas.version>0.9.0-4</augeas.version>
<augeas.classifier>el5</augeas.classifier>
- <augeas.zip.version>0.9.0</augeas.zip.version>
+ <augeas.zip.version>0.9.0-4</augeas.zip.version>
<augeas.zip.location>${settings.localRepository}/net/augeas/augeas-native/${augeas.version}</augeas.zip.location>
<augeas.zip.mask>*-${augeas.classifier}.zip</augeas.zip.mask>
<ant.contrib.version>1.0b3</ant.contrib.version>
@@ -1247,7 +1247,6 @@
</snapshots>
</repository>
-
</repositories>
<pluginRepositories>
commit cd40200ad13c0abf7adcf1e021db81c1c8d967a8
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 29 11:56:01 2012 +0100
Add support for searching of resources, groups and group definitions by name via ?q=
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
index f3bcdff..d051585 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
@@ -22,13 +22,13 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
+import org.rhq.core.domain.criteria.ResourceGroupDefinitionCriteria;
import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.GroupDefinition;
import org.rhq.core.domain.resource.group.ResourceGroup;
-import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
@@ -64,9 +64,12 @@ public class GroupHandlerBean extends AbstractRestBean implements
GroupHandlerLo
@EJB
GroupDefinitionManagerLocal definitionManager;
- public Response getGroups(@Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo) {
+ public Response getGroups(String q, @Context Request request, @Context HttpHeaders
headers, @Context UriInfo uriInfo) {
ResourceGroupCriteria criteria = new ResourceGroupCriteria();
+ if (q!=null) {
+ criteria.addFilterName(q);
+ }
List<ResourceGroup> groups =
resourceGroupManager.findResourceGroupsByCriteria(caller,criteria);
List<GroupRest> list = new ArrayList<GroupRest>(groups.size());
@@ -299,10 +302,14 @@ public class GroupHandlerBean extends AbstractRestBean implements
GroupHandlerLo
}
@Override
- public Response getGroupDefinitions(@Context Request request, @Context HttpHeaders
headers,
+ public Response getGroupDefinitions(String q, @Context Request request, @Context
HttpHeaders headers,
@Context UriInfo uriInfo) {
- PageList<GroupDefinition> gdlist =
definitionManager.getGroupDefinitions(caller,new PageControl());
+ ResourceGroupDefinitionCriteria criteria = new
ResourceGroupDefinitionCriteria();
+ if (q!=null) {
+ criteria.addFilterName(q);
+ }
+ PageList<GroupDefinition> gdlist =
definitionManager.findGroupDefinitionsByCriteria(caller, criteria);
List<GroupDefinitionRest> list = new
ArrayList<GroupDefinitionRest>(gdlist.getTotalSize());
for (GroupDefinition def: gdlist) {
GroupDefinitionRest definitionRest = buildGDRestFromDefinition(def);
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
index 39e0c2a..1cfc171 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
@@ -44,7 +44,8 @@ public interface GroupHandlerLocal {
@GET
@Path("/")
@ApiOperation(value = "List all groups", multiValueResponse = true)
- public Response getGroups(@Context Request request, @Context HttpHeaders headers,
+ public Response getGroups(@ApiParam("String to search in the group name")
@QueryParam("q") String q,
+ @Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
@Cache(isPrivate = true,maxAge = 60)
@@ -129,7 +130,8 @@ public interface GroupHandlerLocal {
@GET
@Path("/definitions")
@ApiOperation(value="List all existing GroupDefinitions",multiValueResponse
= true)
- public Response getGroupDefinitions(@Context Request request, @Context HttpHeaders
headers,
+ public Response getGroupDefinitions(@ApiParam("String to search in the group
definition name") @QueryParam("q") String q,
+ @Context Request request, @Context HttpHeaders
headers,
@Context UriInfo uriInfo);
@GZIP
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
index c0efed4..9709fd6 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
@@ -33,9 +33,6 @@ import javax.ejb.Stateless;
import javax.interceptor.Interceptors;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.HttpHeaders;
@@ -48,6 +45,7 @@ import javax.ws.rs.core.UriInfo;
import org.rhq.core.domain.alert.Alert;
import org.rhq.core.domain.criteria.AlertCriteria;
import org.rhq.core.domain.criteria.AvailabilityCriteria;
+import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.discovery.AvailabilityReport;
import org.rhq.core.domain.measurement.Availability;
import org.rhq.core.domain.measurement.AvailabilityType;
@@ -93,7 +91,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements
ResourceHan
private EntityManager entityManager;
@Override
- public Response getResource(int id, @Context Request request, @Context HttpHeaders
headers, @Context UriInfo uriInfo) {
+ public Response getResource(int id, Request request, HttpHeaders headers, UriInfo
uriInfo) {
Resource res;
res = fetchResource(id);
@@ -121,13 +119,39 @@ public class ResourceHandlerBean extends AbstractRestBean implements
ResourceHan
}
@Override
- public Response getPlatforms(@Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo) {
+ public Response getResourcesByQuery(String q, Request request, HttpHeaders headers,
+ UriInfo uriInfo) {
+ ResourceCriteria criteria = new ResourceCriteria();
+ criteria.addFilterName(q);
+ List<Resource> ret = resMgr.findResourcesByCriteria(caller,criteria);
+
+ Response.ResponseBuilder builder =
getResponseBuilderForResourceList(headers,uriInfo,ret);
+
+ return builder.build();
+ }
+
+ @Override
+ public Response getPlatforms(Request request, HttpHeaders headers, UriInfo uriInfo)
{
PageControl pc = new PageControl();
List<Resource> ret = resMgr.findResourcesByCategory(caller,
ResourceCategory.PLATFORM,
InventoryStatus.COMMITTED, pc);
- List<ResourceWithType> rwtList = new
ArrayList<ResourceWithType>(ret.size());
- for (Resource r : ret) {
+ Response.ResponseBuilder builder = getResponseBuilderForResourceList(headers,
uriInfo, ret);
+
+ return builder.build();
+ }
+
+ /**
+ * Translate the passed list of resources into a response according to the acceptable
mime types etc.
+ * @param headers HttpHeaders from the request
+ * @param uriInfo Uri from the request
+ * @param resources List of resources
+ * @return An initialized ResponseBuilder
+ */
+ private Response.ResponseBuilder getResponseBuilderForResourceList(HttpHeaders
headers, UriInfo uriInfo,
+
List<Resource> resources) {
+ List<ResourceWithType> rwtList = new
ArrayList<ResourceWithType>(resources.size());
+ for (Resource r : resources) {
putToCache(r.getId(), Resource.class, r);
ResourceWithType rwt = fillRWT(r, uriInfo);
rwtList.add(rwt);
@@ -143,8 +167,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements
ResourceHan
};
builder = Response.ok(list);
}
-
- return builder.build();
+ return builder;
}
@Override
@@ -267,7 +290,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements
ResourceHan
}
public Response getSchedules(int resourceId, String scheduleType, boolean
enabledOnly, String name,
- @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo)
{
+ Request request, HttpHeaders headers, UriInfo uriInfo) {
// allow metric as input
if (scheduleType.equals("metric"))
@@ -333,7 +356,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements
ResourceHan
}
@Override
- public Response getChildren(int id, @Context Request request, @Context HttpHeaders
headers, @Context UriInfo uriInfo) {
+ public Response getChildren(int id, Request request, HttpHeaders headers, UriInfo
uriInfo) {
PageControl pc = new PageControl();
Resource parent;
parent = fetchResource(id);
@@ -387,7 +410,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements
ResourceHan
}
@Override
- public Response createPlatform(@PathParam("name") String name, StringValue
typeValue, @Context UriInfo uriInfo) {
+ public Response createPlatform(String name, StringValue typeValue, UriInfo uriInfo)
{
String typeName = typeValue.getValue();
ResourceType type =
resourceTypeManager.getResourceTypeByNameAndPlugin(typeName,"Platforms");
@@ -462,8 +485,8 @@ public class ResourceHandlerBean extends AbstractRestBean implements
ResourceHan
}
@Override
- public Response createResource(@PathParam("name") String name, StringValue
typeValue,
- @QueryParam("plugin") String plugin, int
parentId, UriInfo uriInfo) {
+ public Response createResource(String name, StringValue typeValue,
+ String plugin, int parentId, UriInfo uriInfo) {
Resource parent = resMgr.getResourceById(caller,parentId);
if (parent==null)
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
index b30f8ce..935f875 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
@@ -56,7 +56,7 @@ import org.rhq.enterprise.server.rest.domain.*;
@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML})
@Path("/resource")
@Local
-@Api(value="Resource related", description = "This endpoint deals with
single resources, not groups")
+@Api(value="Resource related", description = "This endpoint deals with
individual resources, not resource groups")
public interface ResourceHandlerLocal {
static String NO_RESOURCE_FOR_ID = "If no resource with the passed id
exists";
@@ -75,6 +75,13 @@ public interface ResourceHandlerLocal {
@Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
+ @GET
+ @Path("/")
+ @ApiOperation(value = "Search for resources by the given search string",
responseClass = "ResourceWithType")
+ Response getResourcesByQuery(@ApiParam("String to search in the resource
name") @QueryParam("q")String q,
+ @Context Request request, @Context HttpHeaders headers,
+ @Context UriInfo uriInfo);
+
@GZIP
@GET
@Path("/platforms")
@@ -170,7 +177,7 @@ public interface ResourceHandlerLocal {
@ApiOperation(value = "Create a resource with a given type below a certain
parent")
@POST
@Path("{name}")
- public javax.ws.rs.core.Response createResource(
+ public Response createResource(
@ApiParam("Name of the new resource") @PathParam("name")
String name,
@ApiParam("Name of the Resource tpye") StringValue type,
@ApiParam("Name of the plugin providing the type")
@QueryParam("plugin") String plugin,
commit 1a86bb955de70ba26b866291de0348000fd95381
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 28 13:49:41 2012 -0500
remove the duplicate dependency for javassist
diff --git a/pom.xml b/pom.xml
index 9703ef0..3c844b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -611,11 +611,6 @@
<scope>import</scope>
</dependency>
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>${javassist.version}</version>
- </dependency>
</dependencies>
</dependencyManagement>
commit 66a8ce5b90d3b20bda5fc1018acf9cfa48af7e3b
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 28 16:10:19 2012 +0100
Get the REST-API to work again.
* Login module is now called 'Database' and no longer
'DatabaseServer'
* Application is relative to /rest , so only put the /1 part in here
* Use the servlet api version 3 descriptor and trim non-needed entries.
* Change the way the cache is obtained. Fix some javadoc.
diff --git
a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
index a0a4280..043e8f8 100644
---
a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
+++
b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
@@ -25,7 +25,7 @@ import org.jboss.dmr.ModelNode;
/**
* Provides convenience methods associated with security domain management.
- *
+ *
* @author John Mazzitelli
*/
public class SecurityDomainJBossASClient extends JBossASClient {
@@ -66,12 +66,12 @@ public class SecurityDomainJBossASClient extends JBossASClient {
/**
* Convenience method that builds a request which can create a new security-domain
* using the SecureIdentity authentication method. This is used when you want
- * to obfuscate a database password in the configuration.
+ * to obfuscate a database password in the configuration.
*
* @param securityDomainName the name of the new security domain
* @param username the username associated with the security domain
* @param password the value of the password to store in the configuration (e.g. the
obfuscated password itself)
- *
+ *
* @throws Exception if failed to create security domain
*/
public void createNewSecureIdentitySecurityDomainRequest(String securityDomainName,
String username, String password)
@@ -107,7 +107,7 @@ public class SecurityDomainJBossASClient extends JBossASClient {
/**
* Convenience method that builds a request which can create a new security domain
* using the database server authentication method. This is used when you want to
directly
- * authenticate against a db entry.
+ * authenticate against a db entry.
*
* @param securityDomainName the name of the new security domain
* @param dsJndiName the jndi name for the datasource to query against
@@ -127,7 +127,7 @@ public class SecurityDomainJBossASClient extends JBossASClient {
ModelNode addAuthNode = createRequest(ADD, addr.clone().add(AUTHENTICATION,
CLASSIC));
ModelNode loginModulesNode = addAuthNode.get(LOGIN_MODULES);
ModelNode loginModule = new ModelNode();
- loginModule.get(CODE).set("DatabaseServer");
+ loginModule.get(CODE).set("Database");
loginModule.get(FLAG).set("required");
ModelNode moduleOptions = loginModule.get(MODULE_OPTIONS);
moduleOptions.setEmptyList();
@@ -150,7 +150,7 @@ public class SecurityDomainJBossASClient extends JBossASClient {
/**
* Convenience method that builds a request which can create a new security domain
* using the database server authentication method. This is used when you want to
directly
- * authenticate against a db entry.
+ * authenticate against a db entry.
*
* @param securityDomainName the name of the new security domain
* @param loginModuleFQCN fully qualified class name to be set as the login-module
"code".
diff --git a/modules/enterprise/gui/rest-war/pom.xml
b/modules/enterprise/gui/rest-war/pom.xml
index 2457c92..0664930 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -32,16 +32,13 @@
</dependency>
<!-- 3rd Party Deps -->
-
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.0.1</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
-
-
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
diff --git a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
index 2b583c2..014c421 100644
--- a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
@@ -1,129 +1,73 @@
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
- <display-name>RHQ Rest interface</display-name>
-
- <context-param>
- <param-name>resteasy.jndi.resources</param-name>
-
<param-value>rhq/StatusHandlerBean/local,rhq/ResourceHandlerBean/local,rhq/MetricHandlerBean/local,rhq/UserHandlerBean/local,rhq/AlertHandlerBean/local,rhq/OperationsHandlerBean/local,rhq/GroupHandlerBean/local,rhq/EventHandlerBean/local</param-value>
- <description>List of jndi names of EJBs local interfaces that define REST
stuff</description>
- </context-param>
- <context-param>
- <param-name>resteasy.providers</param-name>
-
<param-value>org.rhq.enterprise.server.rest.CustomExceptionMapper</param-value>
- <description>Maps Exceptions to HTTP response codes</description>
- </context-param>
- <context-param>
- <param-name>resteasy.servlet.mapping.prefix</param-name>
- <param-value>/1</param-value>
- <description>Prefix of the REST api</description>
- </context-param>
- <context-param>
- <param-name>resteasy.media.type.mappings</param-name>
- <param-value>html : text/html, json : application/json, xml :
application/xml, csv : text/csv, txt: text/plain, yaml:
application/yaml</param-value>
- </context-param>
- <filter>
- <filter-name>JsonPFilter</filter-name>
- <filter-class>org.rhq.enterprise.rest.JsonPFilter</filter-class>
- <init-param>
- <param-name>filter.jsonp.callback</param-name>
- <param-value>jsonp</param-value>
- <description>Name of the callback to use for JsonP
(?jsonp=...)</description>
- </init-param>
- </filter>
-
- <filter>
- <filter-name>RhqRtFilter</filter-name>
-
<filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class>
- </filter>
-
-<!-- Simple request header dumper for debugging purposes
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <display-name>RHQ Rest interface</display-name>
+
+ <context-param>
+ <param-name>resteasy.media.type.mappings</param-name>
+ <param-value>html : text/html, json : application/json, xml : application/xml,
csv : text/csv, txt: text/plain,
+ yaml: application/yaml
+ </param-value>
+ </context-param>
<filter>
- <filter-name>DumperFilter</filter-name>
- <filter-class>org.rhq.enterprise.rest.HeaderDumperFilter</filter-class>
+ <filter-name>JsonPFilter</filter-name>
+ <filter-class>org.rhq.enterprise.rest.JsonPFilter</filter-class>
+ <init-param>
+ <description>Name of the callback to use for JsonP
(?jsonp=...)</description>
+ <param-name>filter.jsonp.callback</param-name>
+ <param-value>jsonp</param-value>
+ </init-param>
</filter>
--->
- <!--
- <filter>
+ <filter>
+ <filter-name>RhqRtFilter</filter-name>
+ <filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class>
+ </filter>
- <filter-name>AuthFilter</filter-name>
- <filter-class>org.rhq.enterprise.rest.AuthFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>AuthFilter</filter-name>
- <servlet-name>Resteasy</servlet-name>
- </filter-mapping>
+ <!-- Simple request header dumper for debugging purposes
+ <filter>
+ <filter-name>DumperFilter</filter-name>
+
<filter-class>org.rhq.enterprise.rest.HeaderDumperFilter</filter-class>
+ </filter>
-->
- <filter-mapping>
- <filter-name>JsonPFilter</filter-name>
- <url-pattern>/1/*</url-pattern>
- </filter-mapping>
-<!--
<filter-mapping>
- <filter-name>DumperFilter</filter-name>
+ <filter-name>JsonPFilter</filter-name>
<url-pattern>/1/*</url-pattern>
</filter-mapping>
--->
-
+ <!--
<filter-mapping>
- <filter-name>RhqRtFilter</filter-name>
- <url-pattern>/1/*</url-pattern>
+ <filter-name>DumperFilter</filter-name>
+ <url-pattern>/1/*</url-pattern>
</filter-mapping>
+ -->
- <servlet>
- <servlet-name>Resteasy</servlet-name>
- <servlet-class>
- org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
- </servlet-class>
-
- <init-param>
- <param-name>resteasy.scan</param-name>
- <param-value>false</param-value>
- </init-param>
-
- <init-param>
- <param-name>javax.ws.rs.Application</param-name>
-
<param-value>org.rhq.enterprise.server.rest.RHQApplication</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Resteasy</servlet-name>
- <url-pattern>/1/*</url-pattern>
- </servlet-mapping>
-
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>REST</web-resource-name>
- <url-pattern>/*</url-pattern>
-<!--
- <http-method>DELETE</http-method>
- <http-method>PUT</http-method>
- <http-method>HEAD</http-method>
- <http-method>OPTIONS</http-method>
- <http-method>TRACE</http-method>
- <http-method>GET</http-method>
- <http-method>POST</http-method>
--->
- </web-resource-collection>
- <auth-constraint>
- <role-name>all</role-name>
- </auth-constraint>
- </security-constraint>
+ <filter-mapping>
+ <filter-name>RhqRtFilter</filter-name>
+ <url-pattern>/1/*</url-pattern>
+ </filter-mapping>
- <login-config>
- <auth-method>BASIC</auth-method>
- <realm-name>RHQ REST</realm-name>
- </login-config>
- <security-role>
- <description>This is valid for all principals, as we do internal
checks</description>
- <role-name>all</role-name>
- </security-role>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>REST</web-resource-name>
+ <url-pattern>/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>all</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>RHQ REST</realm-name>
+ </login-config>
+
+ <security-role>
+ <description>This is valid for all principals, as we do internal
checks</description>
+ <role-name>all</role-name>
+ </security-role>
</web-app>
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
index dd21f15..1e8b99f 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
@@ -65,10 +65,11 @@ import org.rhq.enterprise.server.rest.domain.ResourceWithType;
* For the cache and its eviction policies see standalone-full.xml (in
* the RHQ Server's AS7/standalone/configuration directory, as modified
* by the installer.)
- *
+ *
* @author Heiko W. Rupp
* @author Jay Shaughnessy
*/
+(a)javax.annotation.Resource(name = "ISPN", mappedName =
"java:jboss/infinispan/rhq")
@SuppressWarnings("unchecked")
public class AbstractRestBean {
@@ -76,7 +77,7 @@ public class AbstractRestBean {
static private final CacheKey META_KEY = new
CacheKey("rhq.rest.resourceMeta", 0);
- @javax.annotation.Resource(lookup = "java:jboss/infinispan/rhq")
+ @javax.annotation.Resource( name = "ISPN")
protected CacheContainer container;
protected Cache<CacheKey, Object> cache;
@@ -90,7 +91,7 @@ public class AbstractRestBean {
@PostConstruct
public void start() {
- this.cache = this.container.getCache();
+ this.cache = this.container.getCache("REST-API");
}
/**
@@ -140,7 +141,7 @@ public class AbstractRestBean {
* @param id Id of the object to load.
* @param clazz Wanted return type
* @return Object if found and the caller has access to it.
- * @see #getFqn(int, Class)
+ * @see #getFromCache(int, Class)
*/
protected <T> T getFromCache(int id, Class<T> clazz) {
CacheKey key = new CacheKey(clazz, id);
@@ -152,10 +153,10 @@ public class AbstractRestBean {
* We need to be careful here as we must not return objects the current
* caller has no access to. We do this by checking the "readers" attribute
* of the selected node to see if the caller has put the object there
- * @param fqn FullyQualified name (=path in cache) of the object to retrieve
+ * @param key FullyQualified name (=path in cache) of the object to retrieve
* @param clazz Return type
* @return The desired object if found and valid for the current caller. Null
otherwise.
- * @see #putToCache(org.jboss.cache.Fqn, Object)
+ * @see #putToCache(CacheKey, Object)
*/
protected <T> T getFromCache(CacheKey key, Class<T> clazz) {
Object o = null;
@@ -190,7 +191,7 @@ public class AbstractRestBean {
* @param clazz Type to put in
* @param o Object to put
* @return true if put was successful
- * @see #putToCache(org.jboss.cache.Fqn, Object)
+ * @see #putToCache(CacheKey, Object)
*/
protected <T> boolean putToCache(int id, Class<T> clazz, T o) {
CacheKey key = new CacheKey(clazz, id);
@@ -200,10 +201,10 @@ public class AbstractRestBean {
/**
* Put an object into the cache. We need to record the caller so that we can later
* check if the caller can access that object or not.
- * @param fqn Fully qualified name (=path to object)
+ * @param key Fully qualified name (=path to object)
* @param o Object to put
* @return true if put was successful
- * @see #getFromCache(org.jboss.cache.Fqn, Class)
+ * @see #getFromCache(CacheKey, Class)
*/
@SuppressWarnings("unchecked")
protected <T> boolean putToCache(CacheKey key, T o) {
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
index 162fbae..d174067 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
@@ -32,7 +32,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
*
* @author Heiko W. Rupp
*/
-@ApplicationPath("/rest")
+@ApplicationPath("/1")
public class RHQApplication extends javax.ws.rs.core.Application {
Log log = LogFactory.getLog(RHQApplication.class);
commit bce7a7e69cf497285e8b1be94504e16b59b9d2b9
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 28 10:58:30 2012 -0500
remove the old, now unused, modules/jopr
diff --git a/modules/jopr/LICENSE b/modules/jopr/LICENSE
deleted file mode 100644
index c91e9b6..0000000
--- a/modules/jopr/LICENSE
+++ /dev/null
@@ -1,31 +0,0 @@
-RHQ Management Platform and other included Red Hat Software
-Copyright (C) 2006-2009 Red Hat, Inc. and others
-All rights reserved.
-
-This program is free software; you can redistribute it and/or
-modify it under the following terms.
-
-Parts of this project are available under the terms of the
-GNU General Public License, version 2, as published by the Free
-Software Foundation. Other parts are available under the
-GNU General Public License, version 2, as published by the
-Free Software Foundation, and/or the GNU Lesser
-General Public License, version 2.1, also as published by the Free
-Software Foundation. Which license a module is under is defined
-by the header text of the code within a module.
-
-It is the intention of this license that plugins to this platform
-can be distributed under other licenses as they link only to the
-modules that are also available under the GNU Lesser General
-Public License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License and the GNU Lesser General Public License
-for more details.
-
-You should have received a copies of the GNU General Public License
-and the GNU Lesser General Public License along with this program;
-if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/modules/jopr/LICENSE_GPL b/modules/jopr/LICENSE_GPL
deleted file mode 100644
index d511905..0000000
--- a/modules/jopr/LICENSE_GPL
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/modules/jopr/LICENSE_LGPL b/modules/jopr/LICENSE_LGPL
deleted file mode 100644
index 5ab7695..0000000
--- a/modules/jopr/LICENSE_LGPL
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/modules/jopr/dist/agent/pom.xml b/modules/jopr/dist/agent/pom.xml
deleted file mode 100644
index 9fab897..0000000
--- a/modules/jopr/dist/agent/pom.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<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">
-
- <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- THE AGENT BUILD IS NOT CURRENTLY NEEDED. WE'LL KEEP THIS HERE ONLY FOR REFERENCE
OR FUTURE MODIFICATION IF WE NEED
- TO MAKE JOPR SPECIFIC AGENT CHANGES.
-
- NOTE - The Jopr Agent is the RHQ Agent, unchanged, and is packaged in the RHQ (Server)
Distribution.
-
- NOTE - The rt-filter connectors that were packaged with Jopr are now packaged in the
RHQ (Server) Distribution.
-
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-dist-parent</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-agent</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>Jopr Agent</name>
- <description>The Jopr Agent</description>
-
- <dependencies>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-enterprise-agent</artifactId>
- <version>${rhq.version}</version>
- <type>zip</type>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <finalName>${project.artifactId}-${project.version}</finalName>
- <outputDirectory>target/${project.build.finalName}</outputDirectory>
-
- <plugins>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
-
- <execution>
- <id>build-dist</id>
- <phase>generate-resources</phase>
- <configuration>
- <target>
- <property name="jopr.trunk.dir"
location="../../.." />
- <property name="rhq.agent.dist.zipfile"
location="${settings.localRepository}/org/rhq/rhq-enterprise-agent/${rhq.version}/rhq-enterprise-agent-${rhq.version}.zip"
/>
- <property name="rhq.connectors.dist.zipfile"
location="${settings.localRepository}/org/rhq/rhq-enterprise-agent/${rhq.version}/rhq-product_connectors-${rhq.version}.zip"
/>
- <property name="jopr.agent.dist.dir"
location="${project.build.outputDirectory}" />
- <echo>RHQ Agent dist
zipfile=${rhq.agent.dist.zipfile}</echo>
- <echo>RHQ Product Connectors dist
zipfile=${rhq.connectors.dist.zipfile}</echo>
- <echo>Jopr Agent dist output
dir=${jopr.agent.dist.dir}</echo>
- <unzip src="${rhq.agent.dist.zipfile}"
dest="target" />
- <copy todir="${jopr.agent.dist.dir}">
- <fileset dir="target/rhq-agent-${rhq.version}" />
- </copy>
- <unzip src="${rhq.connectors.dist.zipfile}"
dest="target" />
- <copy todir="${jopr.agent.dist.dir}/product_connectors">
- <!-- none currently
- <fileset dir="${jopr.trunk.dir}/etc/product_connectors"
/>
- -->
- <fileset
dir="target/rhq-product_connectors-${rhq.version}" />
- </copy>
- <copy todir="${jopr.agent.dist.dir}">
- <fileset dir="${jopr.trunk.dir}"
includes="LICENSE*" />
- </copy>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
-
<descriptor>src/main/scripts/jopr-agent.assembly.xml</descriptor>
- </descriptors>
- <finalName>${project.build.finalName}</finalName>
- </configuration>
- <executions>
- <execution>
- <id>assemble-jopr-agent-zip</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
-
- </build>
-
-</project>
\ No newline at end of file
diff --git a/modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml
b/modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml
deleted file mode 100644
index a77b0f9..0000000
--- a/modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<assembly>
- <id>jopr-agent</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <baseDirectory>${project.build.finalName}</baseDirectory>
- <fileSets>
- <fileSet>
- <directory>target/${project.build.finalName}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>**/*.sh</exclude>
- <exclude>**/*.so</exclude>
- <exclude>**/*.sl</exclude>
- <exclude>**/*.dylib</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>target/${project.build.finalName}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- <include>**/*.so</include>
- <include>**/*.sl</include>
- <include>**/*.dylib</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
diff --git a/modules/jopr/dist/pom.xml b/modules/jopr/dist/pom.xml
deleted file mode 100644
index 699fe82..0000000
--- a/modules/jopr/dist/pom.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<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>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-dist-parent</artifactId>
- <packaging>pom</packaging>
-
- <name>Jopr Distros</name>
- <description>parent POM for all Jopr distributions</description>
-
- <modules>
- <!-- Note, The Jopr Agent is the RHQ Agent verbatim. There is no need currently to
make any tweaks. -->
- <module>server</module>
- </modules>
-
-</project>
\ No newline at end of file
diff --git a/modules/jopr/dist/server/pom.xml b/modules/jopr/dist/server/pom.xml
deleted file mode 100644
index 778f92f..0000000
--- a/modules/jopr/dist/server/pom.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<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>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-dist-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-server</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>Jopr Server</name>
- <description>The Jopr Server</description>
-
- <properties>
- <!-- dependency versions -->
- <product.shortName>Jopr</product.shortName>
- <product.name>Jopr</product.name>
- <product.fullName>Jopr</product.fullName>
- <product.url.domain>redhat.com</product.url.domain>
- <product.sales.email>sales(a)redhat.com</product.sales.email>
- <product.support.email>support(a)redhat.com</product.support.email>
- <product.version>${project.version}</product.version>
-
<
product.help.doc.root>http://jopr.org/confluence/display/JOPR2/</pr...
- <product.help.installation>Installation</product.help.installation>
-
<product.help.guide.server>Running+the+Jopr+Server</product.help.guide.server>
-
<product.help.guide.agent>Running+the+Jopr+Agent</product.help.guide.agent>
- <product.help.FAQ>FAQ</product.help.FAQ>
-
<
product.help.config.props>http://jopr.org/confluence/display/JOPR2/Sta...
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-enterprise-server-container</artifactId>
- <version>${rhq.version}</version>
- <type>zip</type>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <finalName>${project.artifactId}-${project.version}</finalName>
- <outputDirectory>target/${project.build.finalName}</outputDirectory>
-
- <resources>
-
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- </resource>
-
- <resource>
- <directory>src/main/resources-filtered</directory>
- <filtering>true</filtering>
- </resource>
-
- <resource>
- <directory>target/resources-filtered</directory>
- <filtering>true</filtering>
- </resource>
-
- </resources>
-
- <plugins>
-
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>move-src</id>
- <phase>process-resources</phase>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <!-- Package the Jopr plugins with the RHQ plugins -->
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-plugins</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-hibernate-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-jboss-as-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-rhq-server-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-tomcat-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- </artifactItems>
-
<outputDirectory>${project.build.outputDirectory}/jbossas/standalone/deployments/rhq.ear.rej/rhq-downloads/rhq-plugins</outputDirectory>
- </configuration>
- </execution>
-
- <!-- if jboss-software plugin is not needed in the binary distribution,
comment this out -->
- <execution>
- <id>copy-jopr-serverplugins</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-serverplugin-jboss-software</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- </artifactItems>
-
<outputDirectory>${project.build.outputDirectory}/jbossas/standalone/deployments/rhq.ear.rej/rhq-serverplugins</outputDirectory>
- </configuration>
- </execution>
- <!-- -->
-
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
-
- <execution>
- <id>build-dist</id>
- <phase>generate-resources</phase>
- <configuration>
- <target>
-
<echo>settings.localRepository=${settings.localRepository}</echo>
-
<echo>project.build.outputDirectory=${project.build.outputDirectory}</echo>
- <ant antfile="src/main/scripts/dist.build.xml"
target="run">
- <property name="settings.localRepository"
value="${settings.localRepository}" />
- <property name="project.build.outputDirectory"
value="${project.build.outputDirectory}" />
-
- <!-- dependency versions -->
- <property name="rhq.version"
value="${rhq.version}" />
-
- <!-- default server settings - these are not used currently; here
just for future use, if needed -->
- <property name="rhq.server.http.port"
value="${rhq.server.http.port}" />
- <property name="rhq.server.https.port"
value="${rhq.server.https.port}" />
- <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}" />
- <property name="rhq.ds.driver-class"
value="${rhq.ds.driver-class}" />
- <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}" />
- <property name="rhq.ds.password"
value="${rhq.ds.password}" />
- <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
- </ant>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
-
<descriptor>src/main/scripts/jopr-server.assembly.xml</descriptor>
- </descriptors>
- <finalName>${project.build.finalName}</finalName>
- </configuration>
- <executions>
- <execution>
- <id>assemble-jopr-server-zip</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
-
- </build>
-
-</project>
diff --git
a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq-installer.war/images/logo.png
b/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq-installer.war/images/logo.png
deleted file mode 100644
index bb4094c..0000000
Binary files
a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq-installer.war/images/logo.png
and /dev/null differ
diff --git
a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/images/logo_header.gif
b/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/images/logo_header.gif
deleted file mode 100644
index bb4094c..0000000
Binary files
a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/images/logo_header.gif
and /dev/null differ
diff --git a/modules/jopr/dist/server/src/main/scripts/dist.build.xml
b/modules/jopr/dist/server/src/main/scripts/dist.build.xml
deleted file mode 100644
index 43c4e40..0000000
--- a/modules/jopr/dist/server/src/main/scripts/dist.build.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<project name="jopr-server" basedir="."
default="run">
-
- <target name="init">
- <property name="jboss.home"
location="${project.build.outputDirectory}/jbossas" />
- <property name="jboss.deploy.dir"
location="${jboss.home}/server/default/deploy" />
- <property name="resources-filtered.dir"
location="${basedir}/target/resources-filtered" />
- </target>
-
- <target name="run" depends="init">
-
- <echo>*** Building Jopr Server dist... ***</echo>
-
- <echo>Unzipping the RHQ Server distro zipfile...</echo>
- <antcall target="unzip-rhq-server" />
-
- <copy todir="${resources-filtered.dir}" encoding="UTF-8"
outputencoding="UTF-8">
- <fileset dir="${project.build.outputDirectory}">
- <include
name="jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/WEB-INF/classes/ApplicationResources.properties.unfiltered"
/>
- <include
name="jbossas/server/default/deploy/rhq-installer.war/WEB-INF/classes/InstallerMessages*.properties.unfiltered"
/>
- </fileset>
- <mapper type="glob" from="*.unfiltered" to="*" />
- </copy>
-
- <!-- NOTE: We copy the binary resources ourselves, because the Maven
resources-plugin will
- not overwrite existing files unless filtering is enabled, and enabling
filtering
- on binary files would cause the files to get corrupted. See
-
http://jira.codehaus.org/browse/MRESOURCES-43 -->
- <echo>Replacing RHQ logos and message bundles with Jopr versions...</echo>
- <copy todir="${project.build.outputDirectory}">
- <fileset dir="${basedir}/src/main/resources-binary" />
- </copy>
-
- <!-- if there are any content source plugins we do not want in the distro,
remove them here -->
- <!--
- <echo>Temporarily deleting the unused content source server
plugins...</echo>
- <delete>
- <fileset dir="${jboss.deploy.dir}"
includes="**/rhq-serverplugin-yum*" />
- </delete>
- -->
-
- <echo>Adding LICENSE files...</echo>
- <copy todir="${project.build.outputDirectory}"
overwrite="true">
- <fileset dir="${basedir}/../../.." includes="LICENSE*" />
- </copy>
-
- </target>
-
- <target name="unzip-rhq-server">
- <property name="rhq-server.zip"
location="${settings.localRepository}/org/rhq/rhq-enterprise-server-container/${rhq.version}/rhq-enterprise-server-container-${rhq.version}.zip"
/>
- <unzip src="${rhq-server.zip}" dest="${basedir}/target" />
-
- <echo>Removing RHQ LICENSE files...</echo>
- <delete>
- <fileset dir="${basedir}/target/rhq-server-${rhq.version}"
includes="**/LICENSE*" />
- </delete>
-
- <move todir="${project.build.outputDirectory}">
- <fileset dir="${basedir}/target/rhq-server-${rhq.version}" />
- </move>
- <delete dir="${basedir}/target/rhq-server-${rhq.version}" />
-
- </target>
-
-</project>
diff --git a/modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml
b/modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml
deleted file mode 100644
index d6d0506..0000000
--- a/modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<assembly>
- <id>jopr-server</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <baseDirectory>${project.build.finalName}</baseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.outputDirectory}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>**/*.sh</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>${project.build.outputDirectory}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
diff --git a/modules/jopr/etc/jbas5-ejb-client/client.bat
b/modules/jopr/etc/jbas5-ejb-client/client.bat
deleted file mode 100644
index fa807a4..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/client.bat
+++ /dev/null
@@ -1,102 +0,0 @@
-@echo off
-rem -------------------------------------------------------------------------
-rem a script for a JBoss remote EJB client
-rem -------------------------------------------------------------------------
-
-rem $Id$
-
-if not "%ECHO%" == "" echo %ECHO%
-if "%OS%" == "Windows_NT" setlocal
-
-set MAIN_JAR_NAME=jbas5-ejb-client-1.0.jar
-set MAIN_CLASS=test.EjbClient
-
-set JBOSS_HOME=C:\opt\jboss-eap-5.0.0-SNAPSHOT
-
-set DIRNAME=.\
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
-set PROGNAME=run.bat
-if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-
-rem Find MAIN_JAR, or we can't continue
-
-set MAIN_JAR=%DIRNAME%\target\%MAIN_JAR_NAME%
-if exist "%MAIN_JAR%" goto FOUND_MAIN_JAR
-echo Could not locate %MAIN_JAR%. Please check that you are in the
-echo bin directory when running this script.
-goto END
-
-:FOUND_MAIN_JAR
-
-if not "%JAVA_HOME%" == "" goto HAVE_JAVA_HOME
-
-set JAVA=java
-
-echo JAVA_HOME is not set. Unexpected results may occur.
-echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
-goto SKIP_SET_JAVA_HOME
-
-:HAVE_JAVA_HOME
-
-set JAVA=%JAVA_HOME%\bin\java
-
-:SKIP_SET_JAVA_HOME
-
-rem only include jbossall-client.jar in classpath, if
-rem JBOSS_CLASSPATH was not yet set
-if not "%JBOSS_CLASSPATH%" == "" goto HAVE_JB_CP
-set JBOSS_CLASSPATH=%JBOSS_HOME%\client\jbossall-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-dependency.jar
-rem Below is temporary!!!
-if not "%USE_PROFILESERVICE_CLIENT%" == "" goto
USE_FULL_PROFILESERVICE
-set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-profileservice-client.jar
-goto DONE_WITH_PROFILE_SERVICE
-:USE_FULL_PROFILESERVICE
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-profileservice.jar
-:DONE_WITH_PROFILESERVICE
-goto HAVE_JB_CP
-
-rem For the call to new InitialContext() (using
org.jnp.interfaces.NamingContextFactory)...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jnp-client.jar
-rem set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-security-aspects.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jbosssx-client.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aop-client.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-common-core.jar
-rem For the call to InitialContext.lookup()...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-remoting.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aspect-jdk50-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\trove.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\javassist.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-security-spi.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-javaee.jar
-rem For remote invocations on the ProfileService proxy (e.g.
ProfileService.getDomains())...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-integration.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-common-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-core-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api.jar
-rem set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api-impl.jar
-set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-spi-client.jar
-set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-impl-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-security-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\concurrent.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-mdr.jar
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-managed.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-metatype.jar
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-dependency.jar
-rem Below is temporary!!!
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-profileservice.jar
-
-:HAVE_JB_CP
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%MAIN_JAR%
-
-rem Setup JBoss sepecific properties
-set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
-
-@echo on
-"%JAVA%" %JAVA_OPTS% -Xmx200M
"-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath
"%JBOSS_CLASSPATH%" %MAIN_CLASS% %*
-
-:END
diff --git a/modules/jopr/etc/jbas5-ejb-client/client.sh
b/modules/jopr/etc/jbas5-ejb-client/client.sh
deleted file mode 100755
index 637de7c..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/client.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-# -------------------------------------------------------------------------
-# a script for a JBoss remote EJB client
-# -------------------------------------------------------------------------
-
-# $Id $
-
-MAIN_JAR_NAME=jbas5-ejb-client-1.0.jar
-MAIN_CLASS=test.EjbClient
-
-JBOSS_HOME=/home/metlos/Projects/java/jbossas-5-EAP/build/output/jboss-5.0.0.Beta
-
-DIRNAME="."
-
-# Find MAIN_JAR, or we can't continue
-
-MAIN_JAR="$DIRNAME/target/$MAIN_JAR_NAME"
-if [ ! -e "$MAIN_JAR" ]; then
- echo Could not locate $MAIN_JAR. Please check that you are in the
- echo bin directory when running this script.
- exit
-fi
-
-JAVA=java
-
-if [ "x" = "x$JAVA_HOME" ]; then
- echo JAVA_HOME is not set. Unexpected results may occur.
- echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
-else
- JAVA="$JAVA_HOME/bin/java"
-fi
-
-# only include jbossall-client.jar in classpath, if
-# JBOSS_CLASSPATH was not yet set
-if [ "x" = "x$JBOSS_CLASSPATH" ]; then
- JBOSS_CLASSPATH="$JBOSS_HOME/client/jbossall-client.jar"
- JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-dependency.jar"
- # Below is temporary!!!
- if [ "x" = "x$USE_PROFILESERVICE_CLIENT" ]; then
-
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/common/lib/jboss-profileservice.jar"
- else
-
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-profileservice-client.jar"
- fi
-fi
-
-# These seem to be skipped in the client.bat
-# rem For the call to new InitialContext() (using
org.jnp.interfaces.NamingContextFactory)...
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jnp-client.jar
-# rem set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-security-aspects.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jbosssx-client.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aop-client.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-common-core.jar
-# rem For the call to InitialContext.lookup()...
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-remoting.jar
-# set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aspect-jdk50-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\trove.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\javassist.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-security-spi.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-javaee.jar
-# rem For remote invocations on the ProfileService proxy (e.g.
ProfileService.getDomains())...
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-integration.jar
-# set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-common-client.jar
-# set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-core-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api.jar
-# rem set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api-impl.jar
-# set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-spi-client.jar
-# set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-impl-client.jar
-# set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-security-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\concurrent.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-mdr.jar
-#
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-managed.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-metatype.jar
-#
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-dependency.jar
-# rem Below is temporary!!!
-# set
JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-profileservice.jar
-
-JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$MAIN_JAR"
-
-# Setup JBoss sepecific properties
-JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
-
-echo "$JAVA" $JAVA_OPTS -Xmx200M
"-Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS" -classpath
"$JBOSS_CLASSPATH" $MAIN_CLASS $@
-"$JAVA" $JAVA_OPTS -Xmx200M
"-Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS" -classpath
"$JBOSS_CLASSPATH" $MAIN_CLASS $@
diff --git a/modules/jopr/etc/jbas5-ejb-client/pom.xml
b/modules/jopr/etc/jbas5-ejb-client/pom.xml
deleted file mode 100644
index c39c8a8..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/pom.xml
+++ /dev/null
@@ -1,280 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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>
-
- <groupId>test</groupId>
- <artifactId>jbas5-ejb-client</artifactId>
- <version>1.0</version>
- <packaging>jar</packaging>
-
- <name>JBAS5 EJB Client</name>
- <description>a simple client for testing connecting to a JBAS5 instance via
JNP, looking up the ProfileService EJB3 beans, and invoking some methods on
them</description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>${jbossas.version}</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <!-- aka jboss-client.jar -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>${jbossas.version}</version>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-common</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-core</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-ext-api</artifactId>
- <version>1.0.0</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-spi</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-impl</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-security</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeScope>runtime</includeScope>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>test.EjbClient</mainClass>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>jboss</id>
- <name>JBoss Repository</name>
- <
url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
-
-</project>
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java
b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java
deleted file mode 100644
index a834dad..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package test;
-
-import java.lang.reflect.Proxy;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
-import org.jboss.profileservice.spi.DeploymentOption;
-import org.jboss.profileservice.spi.ProfileService;
-
-import java.net.URL;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import java.util.List;
-
-public class EjbClient
-{
- private static final String JNDI_LOGIN_INITIAL_CONTEXT_FACTORY =
"org.jboss.security.jndi.JndiLoginInitialContextFactory";
- private static final String NAMING_CONTEXT_FACTORY =
"org.jnp.interfaces.NamingContextFactory";
-
- private static final String SECURE_PROFILE_SERVICE_JNDI_NAME =
"SecureProfileService/remote";
- private static final String SECURE_MANAGEMENT_VIEW_JNDI_NAME =
"SecureManagementView/remote";
-
- private static final String SECURE_DEPLOYMENT_MANAGER_JNDI_NAME =
"SecureDeploymentManager/remote";
-
- private static final String PROFILE_SERVICE_JNDI_NAME = "ProfileService";
- private static final String MANAGEMENT_VIEW_JNDI_NAME = "ManagementView";
- private static final String DEPLOYMENT_MANAGER_JNDI_NAME =
"DeploymentManager";
-
- private static final String PROFILE_SERVICE_PRINCIPAL = "admin";
- private static final String PROFILE_SERVICE_CREDENTIALS = "admin";
-
- public static void main(String[] args)
- throws Exception
- {
- List<String> options = Arrays.asList(args);
-
- boolean unsecure = options.contains("unsecure");
- boolean testDeployment = options.contains("test-deployment");
- boolean testAuth = options.contains("test-auth");
- boolean useJaas = options.contains("jaas");
-
-
//System.setProperty("org.jboss.security.SecurityAssociation.ThreadLocal",
"false");
-
- Properties env = new Properties();
- env.setProperty(Context.PROVIDER_URL, "jnp://127.0.0.1:1099/");
- if (unsecure || useJaas) {
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, NAMING_CONTEXT_FACTORY);
- } else {
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
JNDI_LOGIN_INITIAL_CONTEXT_FACTORY);
- env.setProperty(Context.SECURITY_PRINCIPAL, PROFILE_SERVICE_PRINCIPAL);
- env.setProperty(Context.SECURITY_CREDENTIALS, PROFILE_SERVICE_CREDENTIALS);
- }
-
- InitialContext initialContext = createInitialContext(env);
- ProfileService profileService;
- ManagementView managementView;
- DeploymentManager deploymentManager;
-
- if (unsecure) {
- profileService = (ProfileService)lookup(initialContext,
PROFILE_SERVICE_JNDI_NAME);
- managementView = profileService.getViewManager();
- deploymentManager = profileService.getDeploymentManager();
- } else if (useJaas) {
- profileService = (ProfileService)lookup(initialContext,
PROFILE_SERVICE_JNDI_NAME);
- managementView = (ManagementView)lookup(initialContext,
MANAGEMENT_VIEW_JNDI_NAME);
- deploymentManager = (DeploymentManager)lookup(initialContext,
DEPLOYMENT_MANAGER_JNDI_NAME);
-
- //apply the jaas security
- ClassLoader classLoader = EjbClient.class.getClassLoader();
- profileService = (ProfileService) Proxy.newProxyInstance(classLoader,
- new Class<?>[] { ProfileService.class },
- new JaasAuthenticationInvocationHandler(profileService,
PROFILE_SERVICE_PRINCIPAL, PROFILE_SERVICE_CREDENTIALS));
-
- managementView = (ManagementView) Proxy.newProxyInstance(classLoader,
- new Class<?>[] { ManagementView.class },
- new JaasAuthenticationInvocationHandler(managementView,
PROFILE_SERVICE_PRINCIPAL, PROFILE_SERVICE_CREDENTIALS));
-
- deploymentManager = (DeploymentManager) Proxy.newProxyInstance(classLoader,
- new Class<?>[] { DeploymentManager.class },
- new JaasAuthenticationInvocationHandler(deploymentManager,
PROFILE_SERVICE_PRINCIPAL, PROFILE_SERVICE_CREDENTIALS));
- } else {
- profileService = (ProfileService)lookup(initialContext,
SECURE_PROFILE_SERVICE_JNDI_NAME);
- managementView = (ManagementView)lookup(initialContext,
SECURE_MANAGEMENT_VIEW_JNDI_NAME);
- deploymentManager = (DeploymentManager)lookup(initialContext,
SECURE_DEPLOYMENT_MANAGER_JNDI_NAME);
- }
-
- profileService.getDomains();
- profileService.getProfileKeys();
- managementView.load();
- managementView.getDeploymentNames();
- deploymentManager.getProfiles();
-
- if (testDeployment) {
- tryToDeploySomething(deploymentManager);
- }
-
- if (testAuth) {
- Worker worker = new Worker(managementView);
- worker.run();
- for (int i = 0; i < 50; i++) {
- Thread.sleep(100);
- worker = new Worker(managementView);
- Thread thread = new Thread(worker);
- thread.start();
- }
- Thread.sleep(50);
- worker = new Worker(managementView);
- worker.run();
- }
- }
-
- private static InitialContext createInitialContext(Properties env) throws
NamingException
- {
- System.out.println("Creating JNDI InitialContext with env [" + env +
"]...");
- InitialContext initialContext = new InitialContext(env);
- System.out.println("Created JNDI InitialContext [" + initialContext +
"].");
- return initialContext;
- }
-
- private static Object lookup(InitialContext initialContext, String name) throws
NamingException
- {
- System.out.println("Looking up name '" + name + "' from
InitialContext...");
- Object obj = initialContext.lookup(name);
- System.out.println("Found Object: " + obj);
- return obj;
- }
-
- private static void tryToDeploySomething(DeploymentManager deploymentManager) {
- File tmpFile = null;
-
- try {
- tmpFile = File.createTempFile("ejb-client-test",
".war");
- InputStream dummyWar =
EjbClient.class.getClassLoader().getResourceAsStream("dummy.war");
- BufferedOutputStream out = new BufferedOutputStream(new
FileOutputStream(tmpFile));
- byte[] buffer = new byte[16384];
-
- int cnt = 0;
- while ((cnt = dummyWar.read(buffer)) >= 0) {
- out.write(buffer, 0, cnt);
- }
- dummyWar.close();
- out.close();
- } catch (IOException e) {
- return;
- }
- try {
- URL url = tmpFile.toURI().toURL();
- DeploymentProgress progress = deploymentManager.distribute(tmpFile.getName(),
url, new DeploymentOption[] {});
- progress.run();
-
- if (!progress.getDeploymentStatus().isFailed()) {
- System.out.println("Jar distribution succeeded.");
- String[] deploymentNames =
progress.getDeploymentID().getRepositoryNames();
- progress = deploymentManager.start(deploymentNames);
- progress.run();
- System.out.println("Deployment succeeded.");
- } else {
- System.out.println("Jar distribution failed.");
- }
- } catch (Exception e) {
- System.out.println("Deployment failed.");
- e.printStackTrace();
- } finally {
- tmpFile.delete();
- }
- }
-}
diff --git
a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java
b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java
deleted file mode 100644
index cc5b350..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package test;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-
-/**
- * @author Ian Springer
- */
-public class JBossCallbackHandler implements CallbackHandler {
- private String username;
- private char[] password;
-
- public JBossCallbackHandler(String username, String password)
- {
- this.username = username;
- this.password = password.toCharArray();
- }
-
- public void handle(Callback[] callbacks) throws
- IOException, UnsupportedCallbackException
- {
- for (Callback callback : callbacks)
- {
- //System.out.println("Handling Callback [" + callback +
"]...");
- if (callback instanceof NameCallback)
- {
-
- NameCallback nameCallback = (NameCallback)callback;
- nameCallback.setName(this.username);
- }
- else if (callback instanceof PasswordCallback)
- {
- PasswordCallback passwordCallback = (PasswordCallback)callback;
- passwordCallback.setPassword(this.password);
- }
- else
- {
- throw new UnsupportedCallbackException(callback, "Unrecognized
Callback: " + callback);
- }
- }
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java
b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java
deleted file mode 100644
index 6aaac94..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package test;
-
-import java.util.Map;
-import java.util.HashMap;
-
-import javax.security.auth.login.Configuration;
-import javax.security.auth.login.AppConfigurationEntry;
-
-/**
- * A JAAS configuration for a JBoss client. This is the programmatic equivalent of the
following auth.conf file:
- *
- * <code>
- * jboss
- * {
- * org.jboss.security.ClientLoginModule required
- * multi-threaded=true;
- * };
- * </code>
- *
- * @author Ian Springer
- */
-public class JBossConfiguration extends Configuration {
- public static final String JBOSS_ENTRY_NAME = "jboss";
-
- private static final String JBOSS_LOGIN_MODULE_CLASS_NAME =
"org.jboss.security.ClientLoginModule";
- private static final String MULTI_THREADED_OPTION = "multi-threaded";
-
- public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
- if (JBOSS_ENTRY_NAME.equals(name)) {
- Map options = new HashMap(1);
- options.put(MULTI_THREADED_OPTION, Boolean.TRUE.toString());
- AppConfigurationEntry appConfigurationEntry =
- new AppConfigurationEntry(JBOSS_LOGIN_MODULE_CLASS_NAME,
- AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
- return new AppConfigurationEntry[] {appConfigurationEntry};
- } else {
- throw new IllegalArgumentException("Unknown entry name: " + name);
- }
- }
-
- public void refresh() {
- return;
- }
-}
diff --git
a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java
b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java
deleted file mode 100644
index 1b336e1..0000000
---
a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package test;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-
-import javax.security.auth.login.LoginException;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.Configuration;
-
-/**
- * @author Ian Springer
- */
-public class JaasAuthenticationInvocationHandler implements InvocationHandler {
- private Object target;
- private LoginContext loginContext;
-
- public JaasAuthenticationInvocationHandler(Object target, String username, String
password) {
- this.target = target;
- JBossCallbackHandler jaasCallbackHandler = new JBossCallbackHandler(username,
password);
- Configuration jaasConfig = new JBossConfiguration();
- try {
- this.loginContext = new LoginContext(JBossConfiguration.JBOSS_ENTRY_NAME,
null, jaasCallbackHandler,
- jaasConfig);
- }
- catch (LoginException e) {
- throw new RuntimeException(e);
- }
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- this.loginContext.login();
- Object returnValue = method.invoke(this.target, args);
- this.loginContext.logout();
- return returnValue;
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java
b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java
deleted file mode 100644
index a0fdbe7..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package test;
-
-import java.util.Set;
-import java.util.Map;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.KnownComponentTypes;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.managed.api.DeploymentTemplateInfo;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.metatype.api.values.SimpleValue;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.security.SecurityContextAssociation;
-import org.jboss.security.SecurityContext;
-import org.jboss.security.SecurityIdentity;
-
-/**
- * @author Ian Springer
- */
-public class Worker implements Runnable
-{
- private ManagementView managementView;
-
- public Worker(ManagementView managementView)
- {
- this.managementView = managementView;
- }
-
- public void run()
- {
- System.out.println("Starting worker " + Thread.currentThread() +
"...");
- try
- {
- // Uncomment the below line to reproduce
https://jira.jboss.org/jira/browse/JOPR-263.
- resetSecurityAssociation();
-
- this.managementView.load();
- ComponentType QUEUE_COMPONENT_TYPE =
KnownComponentTypes.JMSDestination.Queue.getType();
- Set<ManagedComponent> queueComponents =
- this.managementView.getComponentsForType(QUEUE_COMPONENT_TYPE);
- ManagedComponent queueComponent = queueComponents.iterator().next();
- queueComponent.getRunState();
-
- // Modify a property...
- queueComponent.getProperties();
- ManagedProperty maxSizeProp =
queueComponent.getProperty("maxSize");
- SimpleValueSupport maxSizeValue =
(SimpleValueSupport)maxSizeProp.getValue();
- maxSizeValue.setValue(99);
- this.managementView.updateComponent(queueComponent);
-
- // Run some operations...
- Set<ManagedOperation> operations = queueComponent.getOperations();
- try
- {
- for (ManagedOperation operation : operations) {
- if (operation.getName().equals("stop")) {
- operation.invoke();
- }
- }
- }
- catch (Exception e)
- {
- System.out.println("Exception when invoking stop(): " + e);
- }
- for (ManagedOperation operation : operations) {
- if (operation.getName().equals("start")) {
- operation.invoke();
- }
- }
-
- // Create a new MO...
- DeploymentTemplateInfo template =
this.managementView.getTemplate("QueueTemplate");
- Map<String,ManagedProperty> props = template.getProperties();
- ManagedProperty jndiNameProp = props.get("JNDIName");
- String currentThreadName = Thread.currentThread().getName();
- SimpleValue newValue = new SimpleValueSupport(SimpleMetaType.STRING,
currentThreadName);
- jndiNameProp.setValue(newValue);
- this.managementView.applyTemplate(currentThreadName, template);
- this.managementView.process();
-
- // Now delete the MO...
- queueComponent = this.managementView.getComponent(currentThreadName,
QUEUE_COMPONENT_TYPE);
- this.managementView.removeComponent(queueComponent);
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- private void resetSecurityAssociation()
- {
- System.out.println("BEFORE RESET: principal=" +
SecurityAssociation.getPrincipal()
- + ", credential=" + SecurityAssociation.getCredential()
- + ", callerPrincipal=" +
SecurityAssociation.getCallerPrincipal()
- + ", subject=" + SecurityAssociation.getSubject()
- + ", runAsIdentity=" + SecurityAssociation.peekRunAsIdentity()
- + ", securityContext=" +
SecurityContextAssociation.getSecurityContext());
- //SecurityAssociation.clear();
- SecurityAssociation.setPrincipal(new SimplePrincipal("admin"));
- SecurityAssociation.setCredential("admin");
- System.out.println("AFTER RESET: principal=" +
SecurityAssociation.getPrincipal()
- + ", credential=" + SecurityAssociation.getCredential()
- + ", callerPrincipal=" +
SecurityAssociation.getCallerPrincipal()
- + ", subject=" + SecurityAssociation.getSubject()
- + ", runAsIdentity=" + SecurityAssociation.peekRunAsIdentity()
- + ", securityContext=" +
SecurityContextAssociation.getSecurityContext());
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/dummy.war
b/modules/jopr/etc/jbas5-ejb-client/src/main/resources/dummy.war
deleted file mode 100644
index 943491d..0000000
Binary files a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/dummy.war and
/dev/null differ
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml
b/modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml
deleted file mode 100644
index b9b5e68..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-
-<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite:
http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
-
- <appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Messagen -->
-
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p
[%c{1}] %m%n"/>
-
- <!--<param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>-->
- </layout>
- </appender>
-
- <appender name="FILE"
class="org.apache.log4j.RollingFileAppender">
- <param name="File" value="target/test.log"/>
- <param name="Append" value="false"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Messagen -->
- <!--
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p
[%c{1}] %m%n"/>
- -->
- <param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
- </layout>
- </appender>
-
- <category name="org.jboss.security">
- <priority value="TRACE"/>
- </category>
-
- <root>
- <priority value="INFO"/>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
-</log4j:configuration>
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/jars/ejb2-test.jar
b/modules/jopr/etc/jbas5-ejb2-mdb-test/jars/ejb2-test.jar
deleted file mode 100644
index a3aeb57..0000000
Binary files a/modules/jopr/etc/jbas5-ejb2-mdb-test/jars/ejb2-test.jar and /dev/null
differ
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml
b/modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml
deleted file mode 100644
index abb38ef..0000000
--- a/modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml
+++ /dev/null
@@ -1,301 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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>
-
- <groupId>test</groupId>
- <artifactId>jbas5-ejb2-mdb-test</artifactId>
- <version>1.0</version>
- <packaging>jar</packaging>
-
- <name>JBAS5 EJB2 MDB Test</name>
- <description></description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>5.1.0.CR1</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>1.3.4-jboss</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>5.1.0.CR1</version>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-common</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-core</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-ext-api</artifactId>
- <version>1.0.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-spi</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-impl</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-security</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-dependency</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-reflect</artifactId>
- </dependency>
-
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-serialization</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-core-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-client-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>jmx-invoker-adaptor-client</classifier>
- </dependency>
-
- <dependency>
- <groupId>jboss.messaging</groupId>
- <artifactId>jboss-messaging-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- </dependency>
-
- <dependency>
- <groupId>apache-log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeScope>runtime</includeScope>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>test.Main</mainClass>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>jboss</id>
- <name>JBoss Repository</name>
- <
url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
-
-</project>
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh
b/modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh
deleted file mode 100755
index b80b85d..0000000
--- a/modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-java -jar target/jbas5-ejb2-mdb-test-1.0.jar "jars/ejb2-test.jar"
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java
b/modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java
deleted file mode 100644
index 83d3a57..0000000
--- a/modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package test;
-
-import java.io.File;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.profileservice.spi.ProfileService;
-
-/**
- * @author Lukas Krejci
- *
- */
-public class Main {
-
- private static String ARCHIVE_NAME = null;
- private static String TEST_JAR_PATH = null;
-
- private static final int MESSAGES_SENT = 10;
- private static final String QUEUE_NAME = "queue/A";
- private static final String MDB_NAME = "StrictlyPooledMDB";
-
- public static void main(String[] args) {
- try {
- TEST_JAR_PATH = args[0];
- File f = new File(TEST_JAR_PATH);
- ARCHIVE_NAME = f.getName();
-
- ManagementView mgtView = getManagementView();
- mgtView.load();
-
- deployTestJar();
-
- mgtView.load();
-
- InitialContext ctx = getInitialContext();
-
- System.out.println("Sending " + MESSAGES_SENT + " messages to
" + QUEUE_NAME);
-
- QueueConnectionFactory factory = (QueueConnectionFactory)
ctx.lookup("ConnectionFactory");
- Queue queue = (Queue) ctx.lookup(QUEUE_NAME);
-
- QueueConnection connection = factory.createQueueConnection();
- connection.start();
-
- QueueSession session = connection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
-
- QueueSender sender = session.createSender(queue);
-
- TextMessage message = session.createTextMessage();
-
- for (int i = 0; i < MESSAGES_SENT; ++i) {
- message.setText("Message no. " + i);
- sender.send(message);
- }
-
- sender.close();
- session.close();
- connection.close();
-
- Thread.sleep(2000);
-
- Set<ManagedComponent> comps = mgtView.getComponentsForType(new
ComponentType("EJB", "MDB"));
- boolean found = false;
- for (ManagedComponent comp : comps) {
- System.out.println(comp.getName());
- if (comp.getName().contains(MDB_NAME)) {
- found = true;
-
- //check the CreateCount property
- ManagedProperty createCountProp =
comp.getProperty("CreateCount");
- System.out.println("CreateCount = " +
createCountProp.getValue());
-
- //check the MessageCount property
- ManagedProperty messageCountProp =
comp.getProperty("MessageCount");
- System.out.println("MessageCount = " +
messageCountProp.getValue());
- break;
- }
- }
- if (!found) {
- System.out.println("Couldn't find the session bean in management
view.");
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- undeploy();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private static InitialContext getInitialContext() throws Exception {
- Properties env = new Properties();
- env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
-
- InitialContext ctx = new InitialContext(env);
- return ctx;
- }
-
- private static ProfileService getProfileService() throws Exception {
- InitialContext ctx = getInitialContext();
- ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
- return ps;
- }
-
- private static ManagementView getManagementView() throws Exception {
- ManagementView activeView = getProfileService().getViewManager();
- // Init the VFS to setup the vfs* protocol handlers
- //VFS.init();
-
- return activeView;
- }
-
- private static DeploymentManager getDeploymentManager() throws Exception {
- DeploymentManager manager = getProfileService().getDeploymentManager();
-
- return manager;
- }
-
- private static void deployTestJar() throws Exception {
- DeploymentManager deploymentManager = getDeploymentManager();
-
- File archiveFile = new File(TEST_JAR_PATH);
-
- DeploymentProgress progress = deploymentManager.distribute(ARCHIVE_NAME,
archiveFile.toURI().toURL(), false);
- progress.run();
-
- DeploymentStatus status = progress.getDeploymentStatus();
-
- if (status.isFailed()) {
- throw new IllegalStateException("Failed to distribute " +
archiveFile.getAbsolutePath() + " with message: "
- + status.getMessage());
- }
-
- String[] deploymentNames = progress.getDeploymentID().getRepositoryNames();
-
- progress = deploymentManager.start(deploymentNames);
- progress.run();
-
- status = progress.getDeploymentStatus();
-
- if (status.isFailed()) {
- throw new IllegalStateException("Failed to start " +
archiveFile.getAbsolutePath() + " with message: "
- + status.getMessage());
- }
- }
-
-
- public static void undeploy() throws Exception {
- DeploymentManager deploymentManager = getDeploymentManager();
-
- DeploymentProgress progress = deploymentManager.remove(ARCHIVE_NAME);
- progress.run();
-
- DeploymentStatus status = progress.getDeploymentStatus();
-
- if (status.isFailed()) {
- throw new IllegalStateException("Failed to undeploy " +
ARCHIVE_NAME + " with message: "
- + status.getMessage());
- }
- }
-}
diff --git a/modules/jopr/etc/jbas5-jnp-client/README
b/modules/jopr/etc/jbas5-jnp-client/README
deleted file mode 100644
index afd0676..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/README
+++ /dev/null
@@ -1,16 +0,0 @@
-To build run the following command:
-
- mvn install
-
-To set up your environment set the JBOSS_HOME directory:
-
- export JBOSS_HOME=/home/rbuck/dev/servers/jboss-eap/5.1.2-ER2/jboss-as
-
-To run the client perform the following command:
-
- ./client.sh
-
-To run the client against a different port or address run the command like this:
-
- ./client.sh jnp://127.0.0.1:1099
-
diff --git a/modules/jopr/etc/jbas5-jnp-client/classpath.txt
b/modules/jopr/etc/jbas5-jnp-client/classpath.txt
deleted file mode 100644
index aac756f..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/classpath.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-This is what Scott recommended using for JBAS 5.1:
-
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-common-core.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jnp-client.jar"/>
- <classpathentry kind="var"
path="JBOSS/lib/jboss-profileservice-spi.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-logging-jdk.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-logging-log4j.jar"/>
- <classpathentry kind="var" path="JBOSS/client/log4j.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-logging-spi.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-aop-client.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-remoting.jar"/>
- <classpathentry kind="var"
path="JBOSS/common/lib/jboss-security-aspects.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-aspect-jdk50-client.jar"/>
- <classpathentry kind="var" path="JBOSS/client/trove.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/javassist.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-mdr.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-security-spi.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jbosssx-client.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/jboss-javaee.jar"/>
- <classpathentry kind="var"
path="JBOSS/client/concurrent.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
-
-And this is what EMS uses for JBAS 3.x/4.x:
-
- public String[] getConnectionClasspathEntries() {
- return
- new String[] {
- // 3.x + jars
- "lib/jboss-jmx.jar",
- "client/jboss-common.jar",
- "lib/jboss-system.jar",
- "client/jbossall-client.jar",
- "client/log4j.jar",
- "*/*/lib/jboss.jar",
- "client/concurrent.jar",
- "client/jboss-jsr77-client.jar",
- // 3.2.3 jars
- "*/*/lib/jboss-transaction.jar",
- "lib/xercesImpl.jar",
- "lib/xml-apis.jar",
- // 4.0 jars
- "lib/dom4j.jar",
- "client/jnp-client.jar",
- "client/jmx-rmi-connector-client.jar",
- "client/jboss-j2ee.jar",
- "*/*/lib/jboss-management.jar",
- "*/*/lib/jbosssx.jar",
- "client/jbosssx-client.jar",
- "lib/endorsed/xercesImpl.jar",
- "lib/endorsed/xml-apis.jar",
- "*/*/lib/hibernate3.jar"
- };
- }
diff --git a/modules/jopr/etc/jbas5-jnp-client/client.bat
b/modules/jopr/etc/jbas5-jnp-client/client.bat
deleted file mode 100644
index 78ddfe3..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/client.bat
+++ /dev/null
@@ -1,83 +0,0 @@
-@echo off
-rem -------------------------------------------------------------------------
-rem a script for a JBoss remote RMI client
-rem -------------------------------------------------------------------------
-
-rem $Id$
-
-if not "%ECHO%" == "" echo %ECHO%
-if "%OS%" == "Windows_NT" setlocal
-
-set MAIN_JAR_NAME=jbas5-jnp-client-1.0.jar
-set MAIN_CLASS=test.RmiClient
-
-set JBOSS_HOME=C:\opt\jboss-eap-5.0.0-SNAPSHOT
-
-set DIRNAME=.\
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
-set PROGNAME=run.bat
-if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-
-rem Find MAIN_JAR, or we can't continue
-
-set MAIN_JAR=%DIRNAME%\target\%MAIN_JAR_NAME%
-if exist "%MAIN_JAR%" goto FOUND_MAIN_JAR
-echo Could not locate %MAIN_JAR%. Please check that you are in the
-echo bin directory when running this script.
-goto END
-
-:FOUND_MAIN_JAR
-
-if not "%JAVA_HOME%" == "" goto HAVE_JAVA_HOME
-
-set JAVA=java
-
-echo JAVA_HOME is not set. Unexpected results may occur.
-echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
-goto SKIP_SET_JAVA_HOME
-
-:HAVE_JAVA_HOME
-
-set JAVA=%JAVA_HOME%\bin\java
-
-:SKIP_SET_JAVA_HOME
-
-rem only include jbossall-client.jar in classpath, if
-rem JBOSS_CLASSPATH was not yet set
-if not "%JBOSS_CLASSPATH%" == "" goto HAVE_JB_CP
-set JBOSS_CLASSPATH=%JBOSS_HOME%\client\jbossall-client.jar
-goto HAVE_JB_CP
-
-rem For the call to new InitialContext() (using
org.jnp.interfaces.NamingContextFactory)...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jnp-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-security-aspects.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jbosssx-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aop-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-common-core.jar
-rem For the call to InitialContext.lookup()...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-remoting.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aspect-jdk50-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\trove.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\javassist.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-security-spi.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-javaee.jar
-rem For remote invocations on the ProfileService proxy (e.g.
ProfileService.getViewManager())...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\concurrent.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-mdr.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-integration.jar
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-managed.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-metatype.jar
-
-:HAVE_JB_CP
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%MAIN_JAR%
-
-rem Setup JBoss sepecific properties
-set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
-
-@echo on
-"%JAVA%" %JAVA_OPTS% "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%"
-classpath "%JBOSS_CLASSPATH%" %MAIN_CLASS% %*
-
-:END
diff --git a/modules/jopr/etc/jbas5-jnp-client/client.sh
b/modules/jopr/etc/jbas5-jnp-client/client.sh
deleted file mode 100755
index 6087710..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/client.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-# -------------------------------------------------------------------------
-# a script for a JBoss remote RMI client
-# -------------------------------------------------------------------------
-
-# $Id: client.sh 558 2009-05-05 03:52:49Z ips $
-
-
-MAIN_JAR_NAME=jbas5-jnp-client-1.0.jar
-MAIN_CLASS=test.RmiClient
-
-if [ -z "$JBOSS_HOME" ]; then
- echo "JBOSS_HOME environment variable is undefined." >&2
- exit 1
-fi
-
-if [ ! -d "$JBOSS_HOME" ]; then
- echo "Dir specified by JBOSS_HOME variable ($JBOSS_HOME) does not exist."
>&2
- exit 1
-fi
-JAVA_OPTS="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8788"
-
-
-# Find MAIN_JAR, or we can't continue
-
-MAIN_JAR=target/$MAIN_JAR_NAME
-if [ ! -f "$MAIN_JAR" ]; then
- echo "Could not locate $MAIN_JAR. Please check that you are in the bin directory
when running this script." >&2
- exit 1
-fi
-
-if [ "`uname`" == "Darwin" ]; then
- JAVA_HOME=/usr
-fi
-
-if [ "$JAVA_HOME" == "" ]; then
- JAVA=java
- echo "JAVA_HOME is not set. Unexpected results may occur. Set JAVA_HOME to the
directory of your local JDK to avoid this message."
-fi
-
-
-JAVA=$JAVA_HOME/bin/java
-
-
-# only include jbossall-client.jar in classpath, if
-# JBOSS_CLASSPATH was not yet set
-#if not "%JBOSS_CLASSPATH%" == "" GOTO HAVE_JB_CP
-JBOSS_CLASSPATH=$JBOSS_HOME/client/jbossall-client.jar
-# AS 6.0 M1 and later needs the following two jars
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-classpool.jar
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-classpool-scoped.jar
-# AS 6.0 M4 and later needs the following two jars
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/common/lib/jboss-as-profileservice.jar
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-profileservice-spi.jar
-
-# For the call to new InitialContext() (using
org.jnp.interfaces.NamingContextFactory)...
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jnp-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/common/lib/jboss-security-aspects.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jbosssx-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-aop-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-common-core.jar
-# For the call to InitialContext.lookup()...
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-#oting.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-aspect-jdk50-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/trove.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/javassist.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-security-spi.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-javaee.jar
-# For remote invocations on the ProfileService proxy (e.g.
ProfileService.getViewManager())...
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/concurrent.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-mdr.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-integration.jar
-
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-managed.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-metatype.jar
-
-#:HAVE_JB_CP
-
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$MAIN_JAR
-
-# Setup JBoss sepecific properties
-JBOSS_ENDORSED_DIRS=$JBOSS_HOME/lib/endorsed
-
-set -x
-"$JAVA" $JAVA_OPTS "-Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS"
-classpath "$JBOSS_CLASSPATH" $MAIN_CLASS $*
-
diff --git a/modules/jopr/etc/jbas5-jnp-client/pom.xml
b/modules/jopr/etc/jbas5-jnp-client/pom.xml
deleted file mode 100644
index a8d7f7e..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/pom.xml
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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>
-
- <groupId>test</groupId>
- <artifactId>jbas5-jnp-client</artifactId>
- <version>1.0</version>
- <packaging>jar</packaging>
-
- <name>JBAS5 JNP Client</name>
- <description>a simple client for testing connecting to a JBAS5 instance via JNP
and looking up the ProfileService</description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>${jbossas.version}</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <!-- aka jboss-client.jar -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeScope>runtime</includeScope>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>test.RmiClient</mainClass>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>jboss</id>
- <name>JBoss Repository</name>
- <
url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
-
-</project>
diff --git a/modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java
b/modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java
deleted file mode 100644
index de32923..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package test;
-
-import java.util.Collection;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.profileservice.spi.Profile;
-import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.profileservice.spi.ProfileService;
-
-public class RmiClient
-{
- private static final String NAMING_CONTEXT_FACTORY =
"org.jboss.security.jndi.JndiLoginInitialContextFactory";
- //private static final String NAMING_CONTEXT_FACTORY =
"org.jnp.interfaces.NamingContextFactory";
-
- private static final String PROFILE_SERVICE_JNDI_NAME = "ProfileService";
-
- public static void main(String[] args)
- throws Exception
- {
- String jnpUrl = (args.length == 1) ? args[0] : "jnp://127.0.0.1:1099";
-
- Properties env = new Properties();
- env.setProperty(Context.PROVIDER_URL, jnpUrl);
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, NAMING_CONTEXT_FACTORY);
- env.setProperty(Context.SECURITY_PRINCIPAL, "admin");
- env.setProperty(Context.SECURITY_CREDENTIALS, "admin");
- env.setProperty("jnp.disableDiscovery", "true");
- env.setProperty("jnp.timeout", "120");
- env.setProperty("jnp.sotimeout", "120");
- InitialContext initialContext = new InitialContext(env);
-
- ProfileService profileService =
(ProfileService)initialContext.lookup(PROFILE_SERVICE_JNDI_NAME);
- System.err.println("ProfileService: " + profileService);
- ManagementView managementView = profileService.getViewManager();
- System.err.println("ManagementView: " + managementView);
- DeploymentManager deploymentManager = profileService.getDeploymentManager();
- System.err.println("DeploymentManager: " + deploymentManager);
-
- profileService.getDomains();
- Collection<ProfileKey> profileKeys = profileService.getActiveProfileKeys();
- for (ProfileKey profileKey : profileKeys) {
- try {
- Profile profile = profileService.getActiveProfile(profileKey);
- System.err.println("Active profile for key [" + profileKey +
"]: " + profile);
- } catch (Exception e) {
- System.err.println("Failed to get active profile for key [" +
profileKey + "] - cause: " + e);
- }
- }
-
- managementView.load();
- managementView.getDeploymentNames();
-
- deploymentManager.loadProfile(new ProfileKey(ProfileKey.DEFAULT));
- deploymentManager.getProfiles();
-
- ComponentType localTxDataSourceType = new ComponentType("DataSource",
"LocalTx");
- ManagedComponent defaultDSComponent =
managementView.getComponent("DefaultDS", localTxDataSourceType);
- ManagedProperty maxPoolSizeProp =
defaultDSComponent.getProperty("query-timeout");
- SimpleValueSupport maxPoolSizeValue =
(SimpleValueSupport)maxPoolSizeProp.getValue();
- System.err.println("getValue(): " + maxPoolSizeValue.getValue());
-
- System.err.println("setValue(33)");
- maxPoolSizeValue.setValue(33);
- managementView.updateComponent(defaultDSComponent);
- managementView.load();
- defaultDSComponent = managementView.getComponent("DefaultDS",
localTxDataSourceType);
- maxPoolSizeProp = defaultDSComponent.getProperty("query-timeout");
- maxPoolSizeValue = ((SimpleValueSupport)maxPoolSizeProp.getValue());
- System.err.println("getValue(): " + maxPoolSizeValue.getValue());
-
- System.err.println("setValue(null)");
- maxPoolSizeValue.setValue(null);
- managementView.updateComponent(defaultDSComponent);
- managementView.load();
- defaultDSComponent = managementView.getComponent("DefaultDS",
localTxDataSourceType);
- maxPoolSizeProp = defaultDSComponent.getProperty("query-timeout");
- maxPoolSizeValue = ((SimpleValueSupport)maxPoolSizeProp.getValue());
- System.err.println("getValue(): " + maxPoolSizeValue.getValue());
- }
-}
-
diff --git a/modules/jopr/modules-plugins-pom.xml b/modules/jopr/modules-plugins-pom.xml
deleted file mode 100644
index 1bb52cf..0000000
--- a/modules/jopr/modules-plugins-pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<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>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <!-- Plugin poms should not set their parent pom to this artifact. Instead, set to
"jopr-modules-parent". This is due to
- the fact that this pom runs integration tests *on* the plugins. This pom must process
in the reactor after the
- plugins themselves, as such, it can't be their parent. -->
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-plugins-parent</artifactId>
- <version>2.3.0.EmbJopr.1.3.0-1</version>
- <packaging>pom</packaging>
- <name>Jopr Plugins</name>
- <description>parent POM for all Jopr plugins</description>
-
- <dependencies>
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-jmx-plugin</artifactId>
- <version>${rhq.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <!-- plugins - order is important -->
- <modules>
- <module>tomcat</module>
- <module>jboss-as</module>
- <module>hibernate</module>
- <module>rhq-server</module>
- <module>jboss-cache</module>
- <module>jboss-as-5</module>
- <module>jboss-cache-v3</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>integration-test</phase>
- <configuration>
- <tasks>
- <property name="test.classpath"
refid="maven.test.classpath" />
- <echo>Validating plugins...</echo>
- <java classname="org.rhq.core.pc.plugin.PluginValidator"
failonerror="true" fork="true">
- <classpath>
- <pathelement path="${test.classpath}" />
- <pathelement
location="hibernate/target/jopr-hibernate-plugin-${project.version}.jar" />
- <pathelement
location="tomcat/target/jopr-tomcat-plugin-${project.version}.jar" />
- <pathelement
location="jboss-as/target/jopr-jboss-as-plugin-${project.version}.jar" />
- <!-- TODO: Figure out why this is causing NoClassDefFoundErrors and fix it.
-->
- <!--<pathelement
location="jboss-as-5/target/jopr-jboss-as-5-plugin-${project.version}.jar"
/>-->
- <pathelement
location="rhq-server/target/jopr-rhq-server-plugin-${project.version}.jar"
/>
- </classpath>
- <sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.SimpleLog" />
- </java>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/modules/jopr/modules-pom.xml b/modules/jopr/modules-pom.xml
deleted file mode 100644
index de9ca10..0000000
--- a/modules/jopr/modules-pom.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<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>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <packaging>pom</packaging>
-
- <name>Jopr Modules</name>
- <description>parent POM for all Jopr modules</description>
-
- <properties>
- <!-- dependency versions -->
- <hibernate-all.version>1.0.0.Alpha9</hibernate-all.version>
- <persistence-api.version>1.0</persistence-api.version>
- </properties>
-
- <!-- These dependencies are (mostly) common to the plugin artifacts built under the
- Jopr umbrella. They are not specific to the build a one particular artifact but
- placed here to simplify the child poms. -->
- <dependencies>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-util</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-plugin-api</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-native-system</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-plugin-container</artifactId>
- <version>${rhq.version}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- Third-party libs -->
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <!-- NOTE: The version is defined in the root POM's dependencyManagement
section. -->
- <scope>provided</scope>
- </dependency>
-
- <!-- TODO: This is a fix for the Javac bug requiring annotations to be available
when compiling dependent classes. It is fixed in JDK 6. -->
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>${persistence-api.version}</version>
- <scope>provided</scope> <!-- by ON container -->
- </dependency>
-
- <!-- TODO: This is a fix for the Javac bug requiring annotations to be available
when compiling dependent classes; it is fixed in JDK 6. -->
- <dependency>
- <groupId>jboss.jboss-embeddable-ejb3</groupId>
- <artifactId>hibernate-all</artifactId>
- <version>${hibernate-all.version}</version>
- <scope>provided</scope> <!-- by ON container -->
- </dependency>
-
- </dependencies>
-
- <modules>
- <module>common</module>
- <module>plugins</module>
- </modules>
-
- <profiles>
-
- <!-- enterprise-only stuff -->
- <profile>
- <id>enterprise</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>serverplugins</module>
- </modules>
- </profile>
-
- <!-- same as enterprise profile, except includes dist -->
- <profile>
- <id>dist</id>
- <modules>
- <module>serverplugins</module>
- <module>dist</module>
- </modules>
- </profile>
-
- </profiles>
-</project>
diff --git a/modules/jopr/pom.xml b/modules/jopr/pom.xml
deleted file mode 100644
index de109aa..0000000
--- a/modules/jopr/pom.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<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>
-
- <!-- NOTE: We extend the RHQ parent pom, because we essentially want all the same
- base settings - plugins, dependencies, etc. -->
- <parent>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>Jopr</name>
- <description>parent POM for all Jopr (non-RHQ) modules</description>
- <
url>http://www.jboss.org/jopr/</url>
- <inceptionYear>2008</inceptionYear>
-
- <organization>
- <name>JBoss, by Red Hat</name>
- <
url>http://jboss.com/</url>
- </organization>
-
- <issueManagement>
- <system>jira</system>
- <
url>https://jira.jboss.org/jira/browse/JOPR</url>
- </issueManagement>
-
- <properties>
- <rhq.groupId>org.rhq</rhq.groupId>
- <rhq.version>${project.parent.version}</rhq.version>
- <rhq.product.name>RHQ</rhq.product.name>
- <rhq.earName>rhq.ear</rhq.earName>
- <!-- the below path is relative to {rhq-trunk} -->
- <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
- <!-- set the below prop to true to enable misc extra build output -->
- <rhq.debug>false</rhq.debug>
- </properties>
-
- <modules>
- <module>modules</module>
- </modules>
-
-</project>
diff --git a/modules/jopr/release.sh b/modules/jopr/release.sh
deleted file mode 100755
index 54f26ab..0000000
--- a/modules/jopr/release.sh
+++ /dev/null
@@ -1,341 +0,0 @@
-#!/bin/sh
-
-# Constants
-
-PROJECT_NAME="jopr"
-PROJECT_DISPLAY_NAME="Jopr"
-PROJECT_SVN_URL="https://svn.jboss.org/repos/jopr"
-TAG_PREFIX="Jopr"
-MINIMUM_MAVEN_VERSION="2.0.10"
-
-
-# Functions
-
-abort()
-{
- echo >&2
- for ARG in "$@"; do
- echo "$ARG" >&2
- done
- exit 1
-}
-
-usage()
-{
- EXE=`basename $0`
- abort "Usage: $EXE community|enterprise RELEASE_VERSION
DEVELOPMENT_VERSION" "Example: $EXE community 2.3.1 2.3.2-SNAPSHOT"
-}
-
-
-# Process command line args.
-
-if [ "$#" -ne 3 ]; then
- usage
-fi
-RELEASE_TYPE="$1"
-if [ "$RELEASE_TYPE" != "community" ] && [
"$RELEASE_TYPE" != "enterprise" ]; then
- usage
-fi
-RELEASE_VERSION="$2"
-TAG_VERSION=`echo $RELEASE_VERSION | sed 's/\./_/g'`
-RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
-DEVELOPMENT_VERSION="$3"
-
-
-# Make sure JAVA_HOME points to a valid JDK 1.6+ install.
-
-if [ -z "$JAVA_HOME" ]; then
- abort "JAVA_HOME environment variable is not set - JAVA_HOME must point to a JDK
(not JRE) 6 install dir."
-fi
-
-if [ ! -d "$JAVA_HOME" ]; then
- abort "JAVA_HOME ($JAVA_HOME) does not exist or is not a directory - JAVA_HOME
must point to a JDK (not JRE) 6 install dir."
-fi
-
-echo "Prepending $JAVA_HOME/bin to PATH..."
-PATH="$JAVA_HOME/bin:$PATH"
-
-if ! which java >/dev/null 2>&1; then
- abort "java not found in PATH ($PATH) - JAVA_HOME must point to a JDK (not JRE) 6
install dir."
-fi
-
-if ! which javac >/dev/null 2>&1; then
- abort "javac not found in PATH ($PATH) - JAVA_HOME must point to a JDK (not JRE)
6 install dir."
-fi
-
-if ! javap java.util.Deque >/dev/null 2>&1; then
- abort "java.util.Deque not found - Java version appears to be less than 1.6 -
Jave version must be 1.6 or later."
-fi
-
-
-# Make sure JAVA5_HOME points to a valid JDK 1.5 install.
-# We need this to validate only Java 5 or earlier APIs are used in all modules, except
the CLI, which requires Java 6.
-
-if [ -z "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME environment variable is not set - JAVA5_HOME must point to a
JDK (not JRE) 1.5 install dir."
-fi
-
-if [ ! -d "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME ($JAVA5_HOME) does not exist or is not a directory - JAVA5_HOME
must point to a JDK (not JRE) 1.5 install dir."
-fi
-
-if [ ! -x "$JAVA5_HOME/bin/java" ]; then
- abort "$JAVA5_HOME/bin/java does not exist or is not executable - JAVA5_HOME must
point to a JDK (not JRE) 1.5 install dir."
-fi
-
-if [ ! -x "$JAVA5_HOME/bin/javac" ]; then
- abort "$JAVA5_HOME/bin/javac does not exist or is not executable - JAVA5_HOME
must point to a JDK (not JRE) 1.5 install dir."
-fi
-
-if ! "$JAVA5_HOME/bin/javap" java.lang.Enum >/dev/null 2>&1; then
- abort "java.lang.Enum not found - JAVA5_HOME ($JAVA5_HOME) version appears to be
less than 1.5 - version must be 1.5.x."
-fi
-
-if "$JAVA5_HOME/bin/javap" java.util.Deque >/dev/null 2>&1; then
- abort "java.util.Deque found - JAVA5_HOME ($JAVA5_HOME) version appears to be
greater than or equal to 1.6 - version must be 1.5.x."
-fi
-
-
-# Make sure M2_HOME points to a valid Maven 2 install.
-
-if [ -z "$M2_HOME" ]; then
- abort "M2_HOME environment variable is not set - M2_HOME must point to a Maven,
$MINIMUM_MAVEN_VERSION or later, install dir."
-fi
-
-if [ ! -d "$M2_HOME" ]; then
- abort "M2_HOME ($M2_HOME) does not exist or is not a directory - M2_HOME must
point to a Maven, $MINIMUM_MAVEN_VERSION or later, install dir."
-fi
-
-echo "Prepending $M2_HOME/bin to PATH..."
-PATH="$M2_HOME/bin:$PATH"
-
-if ! which mvn >/dev/null 2>&1; then
- abort "mvn not found in PATH ($PATH) - M2_HOME must point to a Maven,
$MINIMUM_MAVEN_VERSION or later, install dir."
-fi
-
-
-# Make sure SUBVERSION_HOME points to a valid Subversion install.
-
-if [ -z "$SUBVERSION_HOME" ]; then
- abort "SUBVERSION_HOME environment variable is not set." >&2
-fi
-
-if [ ! -d "$SUBVERSION_HOME" ]; then
- abort "SUBVERSION_HOME ($SUBVERSION_HOME) does not exist or is not a
directory."
-fi
-
-echo "Prepending $SUBVERSION_HOME/bin to PATH..."
-PATH="$SUBVERSION_HOME/bin:$PATH"
-
-if ! which svn >/dev/null 2>&1; then
- abort "svn not found in PATH ($PATH) - SUBVERSION_HOME must point to an SVN
install dir."
-fi
-
-echo "Prepending $SUBVERSION_HOME/lib to LD_LIBRARY_PATH..."
-LD_LIBRARY_PATH="$SUBVERSION_HOME/lib:$LD_LIBRARY_PATH"
-export LD_LIBRARY_PATH
-
-
-# Set additional required env vars.
-
-LANG=en_US.iso88591
-export LANG
-
-
-# Set various local variables.
-
-if [ -z "$BASE_DIR" ]; then
- BASE_DIR="$HOME"
-fi
-WORK_DIR="$BASE_DIR/${PROJECT_NAME}-${RELEASE_TYPE}-${RELEASE_VERSION}"
-
-RELEASE_BRANCH_CHECKOUT_DIR="$WORK_DIR/branch"
-RELEASE_TAG_CHECKOUT_DIR="$WORK_DIR/tag"
-if [ -n "$RELEASE_BRANCH" ]; then
- RELEASE_BRANCH_SVN_URL="$PROJECT_SVN_URL/branches/$RELEASE_BRANCH"
-else
- RELEASE_BRANCH_SVN_URL="$PROJECT_SVN_URL/trunk"
-fi
-RELEASE_TAG_SVN_URL="$PROJECT_SVN_URL/tags/$RELEASE_TAG"
-
-MAVEN_LOCAL_REPO_DIR="$BASE_DIR/release-m2-repo"
-MAVEN_SETTINGS_FILE="$WORK_DIR/settings.xml"
-MAVEN_OPTS="--settings "$MAVEN_SETTINGS_FILE" --debug --errors
-Penterprise -Pdist -Prelease"
-if [ "$RELEASE_TYPE" = "enterprise" ]; then
- #MAVEN_OPTS="$MAVEN_OPTS ..."
-fi
-if [ -z "$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS" ]; then
- MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS="24"
-fi
-
-
-# Print out summary of environment.
-
-echo
-echo "========================= Environment Variables
=============================="
-echo "JAVA_HOME=$JAVA_HOME"
-echo "M2_HOME=$M2_HOME"
-echo "SUBVERSION_HOME=$SUBVERSION_HOME"
-echo "PATH=$PATH"
-echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
-echo "LANG=$LANG"
-echo "============================ Local Variables
================================="
-echo "WORK_DIR=$WORK_DIR"
-echo "PROJECT_NAME=$PROJECT_NAME"
-echo "RELEASE_TYPE=$RELEASE_TYPE"
-echo "RELEASE_VERSION=$RELEASE_VERSION"
-echo "DEVELOPMENT_VERSION=$DEVELOPMENT_VERSION"
-echo "RELEASE_BRANCH=$RELEASE_BRANCH"
-echo "RELEASE_BRANCH_SVN_URL=$RELEASE_BRANCH_SVN_URL"
-echo "RELEASE_BRANCH_CHECKOUT_DIR=$RELEASE_BRANCH_CHECKOUT_DIR"
-echo "RELEASE_TAG=$RELEASE_TAG"
-echo "RELEASE_TAG_SVN_URL=$RELEASE_TAG_SVN_URL"
-echo "RELEASE_TAG_CHECKOUT_DIR=$RELEASE_TAG_CHECKOUT_DIR"
-echo "MAVEN_LOCAL_REPO_DIR=$MAVEN_LOCAL_REPO_DIR"
-echo
"MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS=$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS"
-echo "MAVEN_SETTINGS_FILE=$MAVEN_SETTINGS_FILE"
-echo "MAVEN_OPTS=$MAVEN_OPTS"
-echo "============================ Program Versions
================================"
-mvn --version
-echo
-svn --version | head -2
-echo
"=============================================================================="
-echo
-
-
-# Clean the Maven local repo.
-
-if [ -f "$MAVEN_LOCAL_REPO_DIR" ]; then
- OUTPUT=`find "$MAVEN_LOCAL_REPO_DIR" -maxdepth 0 -mtime
$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS`
- if [ -n "$OUTPUT" ]; then
-
- echo "MAVEN_LOCAL_REPO_DIR ($MAVEN_LOCAL_REPO_DIR) has existed for more than
24 hours - purging it for a clean-clean build..."
- rm -rf "$MAVEN_LOCAL_REPO_DIR"
- fi
-fi
-mkdir -p "$MAVEN_LOCAL_REPO_DIR"
-
-
-# Create the Maven settings file.
-SETTINGS=${WORK_DIR}/settings.xml
-cat <<EOF >${SETTINGS}
-<settings>
- <localRepository>$MAVEN_LOCAL_REPO_DIR</localRepository>
-
- <profiles>
- <profile>
- <id>release</id>
- <properties>
-
<rhq.test.ds.connection-url>jdbc:postgresql://jon03.qa.atl2.redhat.com:5432/rhq_release</rhq.test.ds.connection-url>
- <rhq.test.ds.user-name>rhqadmin</rhq.test.ds.user-name>
- <rhq.test.ds.password>rhqadmin</rhq.test.ds.password>
- <rhq.test.ds.type-mapping>PostgreSQL</rhq.test.ds.type-mapping>
-
<rhq.test.ds.driver-class>org.postgresql.Driver</rhq.test.ds.driver-class>
-
<rhq.test.ds.xa-datasource-class>org.postgresql.xa.PGXADataSource</rhq.test.ds.xa-datasource-class>
-
<rhq.test.ds.server-name>jon03.qa.atl2.redhat.com</rhq.test.ds.server-name>
- <rhq.test.ds.port>5432</rhq.test.ds.port>
- <rhq.test.ds.db-name>rhq_release</rhq.test.ds.db-name>
-
<rhq.test.ds.hibernate-dialect>org.hibernate.dialect.PostgreSQLDialect</rhq.test.ds.hibernate-dialect>
- <!-- quartz properties -->
-
<rhq.test.quartz.driverDelegateClass>org.quartz.impl.jdbcjobstore.PostgreSQLDelegate</rhq.test.quartz.driverDelegateClass>
- <rhq.test.quartz.selectWithLockSQL>SELECT * FROM {0}LOCKS ROWLOCK WHERE
LOCK_NAME = ? FOR UPDATE</rhq.test.quartz.selectWithLockSQL>
-
<rhq.test.quartz.lockHandlerClass>org.quartz.impl.jdbcjobstore.StdRowLockSemaphore</rhq.test.quartz.lockHandlerClass>
- </properties>
- </profile>
- </profiles>
-</settings>
-EOF
-
-
-# Check out the branch, then run a test build before tagging.
-
-if [ -f "$RELEASE_BRANCH_CHECKOUT_DIR" ]; then
- echo "Purging contents of RELEASE_BRANCH_CHECKOUT_DIR
($RELEASE_BRANCH_CHECKOUT_DIR)..."
- rm -rf "$RELEASE_BRANCH_CHECKOUT_DIR"
-fi
-mkdir -p "$RELEASE_BRANCH_CHECKOUT_DIR"
-
-echo "Checking out branch source from $RELEASE_BRANCH_SVN_URL to
$RELEASE_BRANCH_CHECKOUT_DIR (this will take about 5-10 minutes)..."
-# We only need pom.xml and modules/**. Save some time by not checking out etc/**.
-svn co -N $RELEASE_BRANCH_SVN_URL "$RELEASE_BRANCH_CHECKOUT_DIR"
-cd "$RELEASE_BRANCH_CHECKOUT_DIR"
-svn co $RELEASE_BRANCH_SVN_URL/modules
-
-echo
-echo "From another terminal, make the following changes:"
-echo
-echo " 1) In the root pom, set the pom's parent version and the
rhq.version"
-echo " property to the RHQ release version you want this Jopr release to
use."
-echo " 2) Comment out any snapshot deps in the jboss-as-5 and
jboss-cache-v3"
-echo " poms."
-echo
-echo "After you have made these edits and saved the files, hit Enter to
continue."
-read
-echo
-echo "Committing pom updates to SVN..."
-svn commit -m "$PROJECT_DISPLAY_NAME Build $RELEASE_VERSION (in progress)"
-
-echo
-echo "Building project to ensure tests pass and to boostrap local Maven repo (this
will take about 10-15 minutes)..."
-# This will build everything, enforcing Java 5 APIs.
-mvn install $MAVEN_OPTS -Djava5.home=$JAVA5_HOME/jre
-if [ "$?" -ne 0 ]; then
- abort "Build failed. Please see above Maven output for details, fix any issues,
then try again."
-fi
-
-echo
-echo "Test build succeeded!"
-
-
-# Tag the release.
-
-echo "Tagging the release..."
-cd "$RELEASE_BRANCH_CHECKOUT_DIR"
-mvn release:prepare $MAVEN_OPTS -DreleaseVersion=$RELEASE_VERSION
-DdevelopmentVersion=$DEVELOPMENT_VERSION -Dresume=false -Dtag=$RELEASE_TAG -DdryRun=true
-if [ "$?" -ne 0 ]; then
- abort "Tagging failed. Please see above Maven output for details, fix any issues,
then try again."
-fi
-echo
-echo "Tagging succeeded!"
-
-echo
-echo "From another terminal, make the following changes:"
-echo
-echo " 1) In the root pom, set the pom's parent version and the
rhq.version"
-echo " property to the RHQ snapshot version you want Jopr to use
post-release."
-echo " 2) Uncomment any snapshot deps in the jboss-as-5 and jboss-cache-v3"
-echo " poms that you commented out earlier."
-echo
-echo "After you have made these edits and saved the files, hit Enter to
continue."
-read
-echo
-echo "Committing pom updates to SVN..."
-svn commit -m "$PROJECT_DISPLAY_NAME Build $RELEASE_VERSION (done)"
-
-
-# Checkout the tag and build it.
-
-if [ -f "$RELEASE_TAG_CHECKOUT_DIR" ]; then
- echo "Purging contents of RELEASE_TAG_CHECKOUT_DIR
($RELEASE_TAG_CHECKOUT_DIR)..."
- rm -rf "$RELEASE_TAG_CHECKOUT_DIR"
-fi
-mkdir -p "$RELEASE_TAG_CHECKOUT_DIR"
-
-echo "Checking out tag source from $RELEASE_TAG_SVN_URL to $RELEASE_TAG_CHECKOUT_DIR
(this will take about 5-10 minutes)..."
-svn co -N $RELEASE_TAG_SVN_URL "$RELEASE_TAG_CHECKOUT_DIR"
-cd "$RELEASE_TAG_CHECKOUT_DIR"
-svn co $RELEASE_TAG_SVN_URL/modules
-
-echo "Building release from tag (this will take about 10-15 minutes)..."
-mvn install $MAVEN_OPTS -Dmaven.test.skip=true
-if [ "$?" -ne 0 ]; then
- abort "Build failed. Please see above Maven output for details, fix any issues,
then try again."
-fi
-echo
-echo "Release build succeeded!"
-
-echo "=========================== Release Info
==============================="
-echo "Version: $RELEASE_VERSION"
-echo "Branch SVN URL: $RELEASE_BRANCH_SVN_URL"
-echo "Tag SVN URL: $RELEASE_TAG_SVN_URL"
-echo
"========================================================================"
diff --git a/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
b/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
deleted file mode 100644
index c1b2846..0000000
--- a/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
+++ /dev/null
@@ -1,331 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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>
-
- <parent>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-parent</artifactId>
- <version>4.5.0-SNAPSHOT</version>
- <relativePath>../../../../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-jbas5-plugin-descriptor-gen</artifactId>
- <packaging>jar</packaging>
-
- <name>Jopr JBossAS 5.x/6.x Plugin Descriptor Generator</name>
- <description>A tool that connects to a JBoss Application Server 5.x/6.x
instance's Profile Service and generates an RHQ plugin descriptor with a ResourceType
for each ManagedComponent type that is deployed.</description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-jboss-as-5-plugin</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-client-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
-
- <dependency>
- <groupId>apache-xerces</groupId>
- <artifactId>xml-apis</artifactId>
- <version>2.9.1</version>
- </dependency>
-
- <dependency>
- <groupId>sun-jaxb</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.1.4</version>
- </dependency>
-
- <dependency>
- <groupId>sun-jaxb</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>2.1.4</version>
- </dependency>
-<!--
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3.2</version>
- </dependency>
--->
- <dependency>
- <groupId>gnu-getopt</groupId>
- <artifactId>getopt</artifactId>
- <!-- NOTE: The version is defined in the root POM's dependencyManagement
section. -->
- </dependency>
-
- <!-- The below Profile Service API deps can be temporarily set to compile scope,
- so they can be referenced when running within Enterprise Jopr. -->
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- <!--======= client API jars (temporary) =======-->
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>${jbossas.version}</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>1.3.4-jboss</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- aka jboss-client.jar -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>${jbossas.version}</version>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-common</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-core</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-ext-api</artifactId>
- <version>1.0.0</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-spi</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-impl</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-security</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <!-- needed by ManagementView.getDeployment() -->
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-dependency</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- <version>${jbossas.version}</version>
- </dependency>
-
- <!-- The four below deps are needed by the non-EJB proxy but not by the EJB
proxy. -->
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- <archive>
- <manifest>
-
<mainClass>org.jboss.jopr.tool.jbas5.PluginDescriptorGenerator</mainClass>
- </manifest>
- </archive>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <!-- this is used for inheritance merges -->
- <phase>package</phase>
- <!-- bind to the packaging phase -->
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
-</project>
diff --git
a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java
b/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java
deleted file mode 100644
index d1c7f83..0000000
---
a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.jboss.jopr.tool.jbas5;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionMap;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
-import org.rhq.core.domain.configuration.definition.PropertySimpleType;
-import org.rhq.core.domain.configuration.definition.constraint.FloatRangeConstraint;
-import org.rhq.core.domain.configuration.definition.constraint.IntegerRangeConstraint;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.DisplayType;
-import org.rhq.core.domain.measurement.MeasurementCategory;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.measurement.MeasurementUnits;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.domain.resource.ResourceCategory;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.domain.util.StringUtils;
-import org.rhq.plugins.jbossas5.util.MetaTypeUtils;
-import org.rhq.plugins.jbossas5.util.ManagedComponentUtils;
-
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.managed.api.ManagedParameter;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.metatype.api.types.ArrayMetaType;
-import org.jboss.metatype.api.types.CollectionMetaType;
-import org.jboss.metatype.api.types.CompositeMetaType;
-import org.jboss.metatype.api.types.MapCompositeMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.types.PropertiesMetaType;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.types.TableMetaType;
-import org.jboss.metatype.api.values.ArrayValue;
-import org.jboss.metatype.api.values.CollectionValue;
-import org.jboss.metatype.api.values.GenericValue;
-import org.jboss.metatype.api.values.MetaValue;
-
-/**
- * Utility class for converting JBAS5 Profile Service {@link ManagedComponent}s and
{@link ManagedDeployment}s to RHQ
- * {@link ResourceType}s.
- *
- * @author Ian Springer
- */
-public class MetadataConversionUtils
-{
- private static final Log LOG = LogFactory.getLog(MetadataConversionUtils.class);
-
- private static final String PLUGIN_NAME = "ProfileService";
-
- private static Map<String, PropertySimpleType> TYPE_MAP = new HashMap();
-
- static
- {
- TYPE_MAP.put(boolean.class.getName(), PropertySimpleType.BOOLEAN);
- TYPE_MAP.put(Boolean.class.getName(), PropertySimpleType.BOOLEAN);
- TYPE_MAP.put(int.class.getName(), PropertySimpleType.INTEGER);
- TYPE_MAP.put(Integer.class.getName(), PropertySimpleType.INTEGER);
- TYPE_MAP.put(long.class.getName(), PropertySimpleType.LONG);
- TYPE_MAP.put(Long.class.getName(), PropertySimpleType.LONG);
- TYPE_MAP.put(float.class.getName(), PropertySimpleType.FLOAT);
- TYPE_MAP.put(Float.class.getName(), PropertySimpleType.FLOAT);
- TYPE_MAP.put(double.class.getName(), PropertySimpleType.DOUBLE);
- TYPE_MAP.put(Double.class.getName(), PropertySimpleType.DOUBLE);
- }
-
- public static ResourceType convertDeploymentToResourceType(String deploymentTypeName,
ManagedDeployment deployment)
- {
- LOG.debug("Creating ResourceType for ManagedDeployment type [" +
deploymentTypeName + "]...");
- ResourceType resourceType = new ResourceType(deploymentTypeName, PLUGIN_NAME,
ResourceCategory.SERVICE, null);
- Set<MeasurementDefinition> metricDefs =
convertMetricPropertiesToMeasurementDefinitions(deployment);
- resourceType.setMetricDefinitions(metricDefs);
- ConfigurationDefinition resourceConfigDef =
convertConfigurationPropertiesToConfigurationDefinition(deployment);
- resourceType.setResourceConfigurationDefinition(resourceConfigDef);
- return resourceType;
- }
-
- public static ResourceType convertComponentToResourceType(ManagedComponent
component)
- {
- LOG.debug("Creating ResourceType for ManagedComponent type [" +
component.getType() + "]...");
- ComponentType componentType = component.getType();
- String name;
- if (componentType.getSubtype().equals("*"))
- name = component.getName() + " " + componentType.getType();
- else
- name = componentType.getSubtype() + " " + componentType.getType();
- ResourceType resourceType = new ResourceType(name, PLUGIN_NAME,
ResourceCategory.SERVICE, null);
- Set<OperationDefinition> opDefs =
convertManagedOperationsToOperationDefinitions(component);
- for (OperationDefinition opDef : opDefs)
- resourceType.addOperationDefinition(opDef);
- Set<MeasurementDefinition> metricDefs =
convertMetricPropertiesToMeasurementDefinitions(component);
- resourceType.setMetricDefinitions(metricDefs);
- ConfigurationDefinition resourceConfigDef =
convertConfigurationPropertiesToConfigurationDefinition(component);
- resourceType.setResourceConfigurationDefinition(resourceConfigDef);
- return resourceType;
- }
-
- private static Set<OperationDefinition>
convertManagedOperationsToOperationDefinitions(ManagedComponent component)
- {
- Set<OperationDefinition> opDefs = new TreeSet(new
OperationDefinitionComparator());
- Map<String, ManagedOperation> managedOperations = new HashMap();
- for (ManagedOperation operation : component.getOperations())
- {
- ManagedOperation operationWithSameName =
managedOperations.get(operation.getName());
- if (operationWithSameName == null ||
- operationWithSameName.getParameters().length <
operation.getParameters().length)
- {
- if (operationWithSameName != null)
- LOG.info("Found more than one ManagedOperation named '"
+ operation.getName()
- + "' - converting only the one with the most
parameters.");
- managedOperations.put(operation.getName(), operation);
- }
- }
- for (ManagedOperation operation : managedOperations.values())
- {
- OperationDefinition opDef =
convertOperationToOperationDefinition(operation);
- opDefs.add(opDef);
- }
- return opDefs;
- }
-
- private static OperationDefinition
convertOperationToOperationDefinition(ManagedOperation operation)
- {
- String desc = (!operation.getName().equals(operation.getDescription())) ?
operation.getDescription() : null;
- OperationDefinition opDef = new OperationDefinition(operation.getName(), null,
desc);
- opDef.setDisplayName(StringUtils.deCamelCase(operation.getName()));
- ConfigurationDefinition paramsConfigDef =
convertParametersToConfigurationDefinition(operation);
- opDef.setParametersConfigurationDefinition(paramsConfigDef);
- ConfigurationDefinition resultsConfigDef =
convertResultToConfigurationDefinition(operation);
- opDef.setResultsConfigurationDefinition(resultsConfigDef);
- return opDef;
- }
-
- private static ConfigurationDefinition
convertParametersToConfigurationDefinition(ManagedOperation operation)
- {
- if (operation.getParameters() == null || operation.getParameters().length == 0)
- return null;
- ConfigurationDefinition configDef = new
ConfigurationDefinition(operation.getName(), null);
- for (ManagedParameter parameter : operation.getParameters())
- {
- PropertyDefinition propDef =
convertParameterToPropertyDefinition(parameter);
- configDef.put(propDef);
- }
- return configDef;
- }
-
- private static PropertyDefinition
convertParameterToPropertyDefinition(ManagedParameter parameter)
- {
- PropertyDefinition propDef =
convertMetaTypeToPropertyDefinition(parameter.getMetaType(), parameter.getName(),
- parameter.getValue());
- String desc = (!parameter.getName().equals(parameter.getDescription())) ?
parameter.getDescription() : null;
- propDef.setDescription(desc);
- // TODO: Convert parameter.getLegalValues() to enum defs.
- if (propDef instanceof PropertyDefinitionSimple)
- {
- PropertyDefinitionSimple propDefSimple = (PropertyDefinitionSimple)propDef;
- addConstraints(propDefSimple, parameter.getMinimumValue(),
parameter.getMaximumValue());
- }
- return propDef;
- }
-
- private static PropertyDefinitionList
convertMetaTypeToPropertyDefinitionList(MetaType metaType, String name,
-
MetaValue metaValue)
- {
- MetaType elementType;
- MetaValue elementValue = null;
- if (metaType.isCollection())
- {
- CollectionMetaType collectionMetaType = (CollectionMetaType)metaType;
- elementType = collectionMetaType.getElementType();
- if (metaValue != null)
- {
- CollectionValue collectionValue = (CollectionValue)metaValue;
- MetaValue[] elements = collectionValue.getElements();
- if (elements != null && elements.length != 0)
- elementValue = elements[0];
- }
- }
- else if (metaType.isArray())
- {
- ArrayMetaType arrayMetaType = (ArrayMetaType)metaType;
- elementType = arrayMetaType.getElementType();
- if (metaValue != null)
- {
- ArrayValue arrayValue = (ArrayValue)metaValue;
- if (arrayValue.getLength() != 0 && arrayValue.getValue(0)
instanceof MetaValue)
- elementValue = (MetaValue)arrayValue.getValue(0);
- }
- }
- else
- {
- throw new IllegalStateException("Unsupported MetaType: " +
metaType);
- }
- PropertyDefinition elementPropDef =
convertMetaTypeToPropertyDefinition(elementType, "element", elementValue);
- @SuppressWarnings({"UnnecessaryLocalVariable"})
- PropertyDefinitionList propDefList = new PropertyDefinitionList(name, null, true,
elementPropDef);
- return propDefList;
- }
-
- private static PropertyDefinitionMap convertMetaTypeToPropertyDefinitionMap(MetaType
metaType, String name,
- MetaValue
metaValue)
- {
- PropertyDefinitionMap propDefMap = new PropertyDefinitionMap(name, null, false);
- if (metaType.isComposite())
- {
- if (!(metaType instanceof MapCompositeMetaType))
- {
- CompositeMetaType compositeMetaType = (CompositeMetaType)metaType;
- for (String itemName : compositeMetaType.itemSet())
- {
- MetaType itemMetaType = compositeMetaType.getType(itemName);
- if (itemMetaType.isComposite())
- {
- // Avoid StackOverflowErrors caused by recursive
CompositeMetaType metadata.
- if (itemMetaType == compositeMetaType)
- LOG.error("CompositeMetaType " + compositeMetaType
- + " contains an item whose type is a reference
to the CompositeMetaType itself!");
- else
- LOG.error("CompositeMetaType " + compositeMetaType
- + " contains an item whose type is another
CompositeMetaType: " + itemMetaType);
- continue;
- }
- LOG.trace("Converting item with type [" + itemMetaType +
"@" + System.identityHashCode(itemMetaType)
- + "] and name [" + itemName + "]...");
- PropertyDefinition itemPropDef =
convertMetaTypeToPropertyDefinition(itemMetaType, itemName, null);
- propDefMap.put(itemPropDef);
- String desc =
(!itemName.equals(compositeMetaType.getDescription(itemName))) ?
- compositeMetaType.getDescription(itemName) : null;
- itemPropDef.setDescription(desc);
- }
- }
- }
- else if (metaType.isGeneric())
- {
- if (metaValue != null)
- {
- GenericValue genericValue = (GenericValue)metaValue;
- Serializable value = genericValue.getValue();
- if (value != null && value instanceof ManagedObject)
- {
- ManagedObject managedObject = (ManagedObject)value;
- for (ManagedProperty managedProp :
managedObject.getProperties().values())
- {
- PropertyDefinition itemPropDef =
convertManagedPropertyToPropertyDefinition(managedProp);
- propDefMap.put(itemPropDef);
- }
- }
- }
- }
- else if (metaType.isTable())
- {
- TableMetaType tableMetaType = (TableMetaType)metaType;
- CompositeMetaType itemMetaType = tableMetaType.getRowType();
- for (String itemName : tableMetaType.getIndexNames())
- {
- PropertyDefinition itemPropDef =
convertMetaTypeToPropertyDefinition(itemMetaType, itemName, null);
- propDefMap.put(itemPropDef);
- }
- }
- else if (metaType instanceof PropertiesMetaType)
- {
- @SuppressWarnings({"UnusedDeclaration"})
- PropertiesMetaType propertiesMetaType = (PropertiesMetaType)metaType;
- }
- return propDefMap;
- }
-
- private static ConfigurationDefinition
convertResultToConfigurationDefinition(ManagedOperation operation)
- {
- MetaType returnType = operation.getReturnType();
- if (returnType.getClassName().equals(Void.class.getName()))
- return null;
- PropertyDefinition propDef = convertMetaTypeToPropertyDefinition(returnType,
"result", null);
- ConfigurationDefinition configDef = new
ConfigurationDefinition(operation.getName(), operation.getDescription());
- configDef.put(propDef);
- return configDef;
- }
-
- private static Set<MeasurementDefinition>
convertMetricPropertiesToMeasurementDefinitions(ManagedDeployment deployment)
- {
- return
convertMetricPropertiesToMeasurementDefinitions(deployment.getProperties());
- }
-
- private static Set<MeasurementDefinition>
convertMetricPropertiesToMeasurementDefinitions(ManagedComponent component)
- {
- return
convertMetricPropertiesToMeasurementDefinitions(component.getProperties());
- }
-
- private static Set<MeasurementDefinition>
convertMetricPropertiesToMeasurementDefinitions(Map<String, ManagedProperty> props)
- {
- Set<MeasurementDefinition> measurementDefs = new TreeSet(new
MeasurementDefinitionComparator());
- if (props == null)
- return measurementDefs;
- for (ManagedProperty prop : props.values())
- {
- if (prop.hasViewUse(ViewUse.RUNTIME) || prop.hasViewUse(ViewUse.STATISTIC))
- {
- MetaType metaType = prop.getMetaType();
- if (metaType.isSimple() || metaType.isEnum())
- {
- MeasurementDefinition measurementDef =
getMeasurementDefinitionForSimpleManagedProperty(prop);
- measurementDefs.add(measurementDef);
- }
- else if (prop.getMetaType().isComposite())
- {
- Set<MeasurementDefinition> compositeMeasurementDefs =
- getMeasurementDefinitionsForCompositeManagedProperty(prop);
- measurementDefs.addAll(compositeMeasurementDefs);
- }
- else
- {
- LOG.warn("Skipping property [" + prop + "] with
unsupported type [" + metaType + "].");
- }
- }
- }
- return measurementDefs;
- }
-
- private static MeasurementDefinition
getMeasurementDefinitionForSimpleManagedProperty(ManagedProperty prop)
- {
- MetaType metaType = prop.getMetaType();
- DataType dataType;
- if (metaType.isSimple())
- {
- SimpleMetaType simpleMetaType = (SimpleMetaType)metaType;
- dataType = (prop.hasViewUse(ViewUse.STATISTIC) &&
MetaTypeUtils.isNumeric(simpleMetaType)) ?
- DataType.MEASUREMENT : DataType.TRAIT;
- }
- else
- { // metaType.isEnum()
- // Enum values are always Strings.
- dataType = DataType.TRAIT;
- }
- int defaultInterval = (dataType == DataType.MEASUREMENT) ? 60000 : 600000;
- DisplayType displayType = (dataType == DataType.MEASUREMENT) ? DisplayType.DETAIL
: DisplayType.SUMMARY;
- MeasurementDefinition measurementDef = new MeasurementDefinition(prop.getName(),
- MeasurementCategory.PERFORMANCE, MeasurementUnits.NONE, dataType, true,
defaultInterval, displayType);
- measurementDef.setDisplayName(StringUtils.deCamelCase(prop.getName()));
- String desc = (!prop.getName().equals(prop.getDescription())) ?
prop.getDescription() : null;
- measurementDef.setDescription(desc);
- return measurementDef;
- }
-
- private static Set<MeasurementDefinition>
getMeasurementDefinitionsForCompositeManagedProperty(ManagedProperty property)
- {
- Set<MeasurementDefinition> measurementDefs = new HashSet();
- CompositeMetaType compositeMetaType = (CompositeMetaType)property.getMetaType();
- Set<String> itemNames = compositeMetaType.keySet();
- for (String itemName : itemNames)
- {
- MetaType itemType = compositeMetaType.getType(itemName);
- if (itemType.isSimple() || itemType.isEnum())
- {
- String metricName = property.getName() + "." + itemName;
- DataType dataType =
(itemType.getClassName().equals(String.class.getName())) ?
- DataType.TRAIT : DataType.MEASUREMENT;
- MeasurementDefinition measurementDef = new
MeasurementDefinition(metricName,
- MeasurementCategory.PERFORMANCE, MeasurementUnits.NONE, dataType,
true, 60000,
- DisplayType.DETAIL);
- measurementDefs.add(measurementDef);
- measurementDef.setDisplayName(StringUtils.deCamelCase(itemName));
- }
- else
- {
- LOG.warn("Composite stat property [" + property.getName() +
"] contains non-simple item with type ["
- + itemType + "] - skipping...");
- }
- }
- return measurementDefs;
- }
-
- private static ConfigurationDefinition
convertConfigurationPropertiesToConfigurationDefinition(String configName, Map<String,
ManagedProperty> managedProps)
- {
- Set<PropertyDefinition> propDefs = new TreeSet(new
PropertyDefinitionComparator());
- for (ManagedProperty prop : managedProps.values())
- {
- EnumSet<ViewUse> viewUses = ManagedComponentUtils.getViewUses(prop);
- // Assume a property with no view uses is a config prop.
- if (viewUses.contains(ViewUse.CONFIGURATION) ||
viewUses.contains(ViewUse.RUNTIME) || viewUses.isEmpty())
- {
- PropertyDefinition propDef =
convertManagedPropertyToPropertyDefinition(prop);
- propDefs.add(propDef);
- }
- }
- if (propDefs.isEmpty())
- return null;
- ConfigurationDefinition configDef = new ConfigurationDefinition(configName,
null);
- for (PropertyDefinition propDef : propDefs)
- configDef.getPropertyDefinitions().put(propDef.getName(), propDef);
- return configDef;
- }
-
- private static PropertyDefinition
convertManagedPropertyToPropertyDefinition(ManagedProperty prop)
- {
- PropertyDefinition propDef;
- propDef = convertMetaTypeToPropertyDefinition(prop.getMetaType(), prop.getName(),
prop.getValue());
- String desc = (!prop.getName().equals(prop.getDescription())) ?
prop.getDescription() : null;
- propDef.setDescription(desc);
- propDef.setRequired(prop.isMandatory());
- propDef.setReadOnly(prop.isReadOnly());
- // TODO: Convert prop.getLegalValues() to enum defs.
- if (propDef instanceof PropertyDefinitionSimple)
- {
- PropertyDefinitionSimple propDefSimple = (PropertyDefinitionSimple)propDef;
- addConstraints(propDefSimple, prop.getMinimumValue(),
prop.getMaximumValue());
- }
- return propDef;
- }
-
- private static PropertyDefinition convertMetaTypeToPropertyDefinition(MetaType
metaType, String propName,
- MetaValue
metaValue)
- {
- PropertyDefinition propDef;
- if (metaType.isSimple() || metaType.isEnum())
- {
- PropertySimpleType propType =
convertClassToPropertySimpleType(metaType.getClassName());
- propDef = new PropertyDefinitionSimple(propName, null, false, propType);
- }
- else if (metaType.isCollection() || metaType.isArray())
- {
- propDef = convertMetaTypeToPropertyDefinitionList(metaType, propName,
metaValue);
- }
- else if (metaType.isComposite() || metaType.isGeneric() || metaType.isTable() ||
- metaType instanceof PropertiesMetaType)
- {
- LOG.trace("Converting map with type [" + metaType + "@" +
System.identityHashCode(metaType) + "], name ["
- + propName + "], and value [" + metaValue +
"]...");
- propDef = convertMetaTypeToPropertyDefinitionMap(metaType, propName,
metaValue);
- }
- else
- {
- throw new IllegalStateException("Unsupported MetaType: " +
metaType);
- }
- propDef.setDisplayName(StringUtils.deCamelCase(propName));
- return propDef;
- }
-
- private static ConfigurationDefinition
convertConfigurationPropertiesToConfigurationDefinition(ManagedDeployment deployment)
- {
- return
convertConfigurationPropertiesToConfigurationDefinition(deployment.getName() + "
resource config",
- deployment.getProperties());
- }
-
- private static ConfigurationDefinition
convertConfigurationPropertiesToConfigurationDefinition(ManagedComponent component)
- {
- return
convertConfigurationPropertiesToConfigurationDefinition(component.getName() + "
resource config",
- component.getProperties());
- }
-
- private static PropertySimpleType convertClassToPropertySimpleType(String className)
- {
- PropertySimpleType simpleType = TYPE_MAP.get(className);
- return (simpleType != null) ? simpleType : PropertySimpleType.STRING;
- }
-
- private static void addConstraints(PropertyDefinitionSimple propDefSimple,
Comparable<?> minValue,
- Comparable<?> maxValue)
- {
- if (minValue != null || maxValue != null)
- {
- if (propDefSimple.getType() == PropertySimpleType.INTEGER ||
- propDefSimple.getType() == PropertySimpleType.LONG)
- {
- Long min = (minValue != null) ? ((Number)minValue).longValue() : null;
- Long max = (maxValue != null) ? ((Number)maxValue).longValue() : null;
- IntegerRangeConstraint constraint = new IntegerRangeConstraint(min,
max);
- propDefSimple.addConstraints(constraint);
- }
- else if (propDefSimple.getType() == PropertySimpleType.FLOAT ||
- propDefSimple.getType() == PropertySimpleType.DOUBLE)
- {
- Double min = (minValue != null) ? ((Number)minValue).doubleValue() :
null;
- Double max = (maxValue != null) ? ((Number)maxValue).doubleValue() :
null;
- FloatRangeConstraint constraint = new FloatRangeConstraint(min, max);
- propDefSimple.addConstraints(constraint);
- }
- }
- }
-
- private static class OperationDefinitionComparator implements
Comparator<OperationDefinition>
- {
- public int compare(OperationDefinition opDef1, OperationDefinition opDef2)
- {
- return opDef1.getName().compareTo(opDef2.getName());
- }
- }
-
- private static class MeasurementDefinitionComparator implements
Comparator<MeasurementDefinition>
- {
- public int compare(MeasurementDefinition metricDef1, MeasurementDefinition
metricDef2)
- {
- return metricDef1.getName().compareTo(metricDef2.getName());
- }
- }
-
- private static class PropertyDefinitionComparator implements
Comparator<PropertyDefinition>
- {
- public int compare(PropertyDefinition propDef1, PropertyDefinition propDef2)
- {
- return propDef1.getName().compareTo(propDef2.getName());
- }
- }
-}
diff --git
a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java
b/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java
deleted file mode 100644
index 31de2a8..0000000
---
a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.jboss.jopr.tool.jbas5;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.lang.String;
-import java.math.BigInteger;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Marshaller;
-import javax.xml.namespace.QName;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.clientapi.descriptor.DescriptorPackages;
-import org.rhq.core.clientapi.descriptor.configuration.ConfigurationDescriptor;
-import org.rhq.core.clientapi.descriptor.configuration.ConfigurationProperty;
-import org.rhq.core.clientapi.descriptor.configuration.ListProperty;
-import org.rhq.core.clientapi.descriptor.configuration.MapProperty;
-import org.rhq.core.clientapi.descriptor.configuration.PropertyType;
-import org.rhq.core.clientapi.descriptor.configuration.SimpleProperty;
-import org.rhq.core.clientapi.descriptor.plugin.MetricDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.OperationDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.ResourceDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.ServiceDescriptor;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionMap;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
-import org.rhq.core.domain.configuration.definition.PropertySimpleType;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.plugins.jbossas5.connection.RemoteProfileServiceConnectionProvider;
-import org.rhq.plugins.jbossas5.connection.ProfileServiceConnectionProvider;
-import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
-import org.rhq.plugins.jbossas5.util.ManagedComponentUtils;
-
-import org.jboss.deployers.spi.management.KnownDeploymentTypes;
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.profileservice.spi.NoSuchDeploymentException;
-
-/**
- * Generates an RHQ plugin descriptor based on the ManagedComponent types represented in
a Profile Service
- * ManagementView.
- *
- * @author Ian Springer
- */
-public class PluginDescriptorGenerator
-{
- private static final Log LOG = LogFactory.getLog(PluginDescriptorGenerator.class);
-
- private static final QName SIMPLE_PROPERTY_QNAME = new
QName(RhqNamespacePrefixMapper.CONFIGURATION_NAMESPACE, "simple-property");
- private static final QName LIST_PROPERTY_QNAME = new
QName(RhqNamespacePrefixMapper.CONFIGURATION_NAMESPACE, "list-property");
- private static final QName MAP_PROPERTY_QNAME = new
QName(RhqNamespacePrefixMapper.CONFIGURATION_NAMESPACE, "map-property");
-
- private static Map<PropertySimpleType, PropertyType> TYPE_MAP = new HashMap();
-
- static
- {
- TYPE_MAP.put(PropertySimpleType.BOOLEAN, PropertyType.BOOLEAN);
- TYPE_MAP.put(PropertySimpleType.DIRECTORY, PropertyType.DIRECTORY);
- TYPE_MAP.put(PropertySimpleType.DOUBLE, PropertyType.DOUBLE);
- TYPE_MAP.put(PropertySimpleType.FILE, PropertyType.FILE);
- TYPE_MAP.put(PropertySimpleType.FLOAT, PropertyType.FLOAT);
- TYPE_MAP.put(PropertySimpleType.INTEGER, PropertyType.INTEGER);
- TYPE_MAP.put(PropertySimpleType.LONG, PropertyType.LONG);
- TYPE_MAP.put(PropertySimpleType.LONG_STRING, PropertyType.LONG_STRING);
- TYPE_MAP.put(PropertySimpleType.PASSWORD, PropertyType.PASSWORD);
- TYPE_MAP.put(PropertySimpleType.STRING, PropertyType.STRING);
- }
-
- public static void main(String[] args) throws Exception
- {
- if (args.length > 1)
- {
- throw new IllegalArgumentException("Too many args. Usage: " +
PluginDescriptorGenerator.class.getSimpleName() + " [jnpURL]");
- }
- String namingURL = (args.length == 1) ? args[0] :
"jnp://127.0.0.1:1099/";
- String principal = "admin";
- String credentials = "admin";
- ProfileServiceConnectionProvider connectionProvider =
- new RemoteProfileServiceConnectionProvider(namingURL, principal,
credentials);
- ProfileServiceConnection connection = connectionProvider.connect();
- generatePluginDescriptor(connection.getManagementView(), new
File("."));
- }
-
- public static void generatePluginDescriptor(ManagementView managementView, File
tempDir) throws Exception
- {
- PluginDescriptor pluginDescriptor = new PluginDescriptor();
- addComponentsToDescriptor(managementView, pluginDescriptor);
- addDeploymentsToDescriptor(managementView, pluginDescriptor);
- File tempFile = File.createTempFile("rhq-plugin", ".xml",
tempDir);
- writeToFile(pluginDescriptor, tempFile);
- }
-
- private static void addDeploymentsToDescriptor(ManagementView managementView,
PluginDescriptor pluginDescriptor) throws Exception
- {
- Set<String> knownDeploymentTypeNames = getKnownDeploymentTypeNames();
- for (String deploymentTypeName : knownDeploymentTypeNames)
- {
- Set<String> deploymentNames =
managementView.getDeploymentNamesForType(deploymentTypeName);
- if (deploymentNames == null || deploymentNames.isEmpty())
- {
- LOG.warn("No deployments of type [" + deploymentTypeName +
"] found.");
- continue;
- }
- ManagedDeployment deployment = null;
- for (String deploymentName : deploymentNames)
- {
- try
- {
- // Use the first one we successfully retrieve as a representative
sample of the type.
- deployment = managementView.getDeployment(deploymentName);
- break;
- }
- catch (NoSuchDeploymentException e)
- {
- LOG.warn(e);
- }
- }
- if (deployment == null)
- {
- LOG.warn("Unable to successfully retrieve a Deployment of type
[" + deploymentTypeName
- + "] due to
https://jira.jboss.org/jira/browse/JBAS-5640.");
- continue;
- }
- // First convert ManagedDeployment to ResourceType...
- ResourceType resourceType =
MetadataConversionUtils.convertDeploymentToResourceType(deploymentTypeName,
- deployment);
- // Then convert ResourceType to JAXB ServiceDescriptor object.
- convertAndMergeResourceType(pluginDescriptor, resourceType);
- }
- }
-
- private static void addComponentsToDescriptor(ManagementView managementView,
PluginDescriptor pluginDescriptor) throws Exception
- {
- Set<ComponentType> componentTypes = managementView.getComponentTypes();
- Set<ComponentType> sortedComponentTypes = new
TreeSet<ComponentType>(ManagedComponentUtils.getComponentTypeComparator());
- sortedComponentTypes.addAll(componentTypes);
- for (ComponentType componentType : sortedComponentTypes)
- {
- Set<ManagedComponent> components =
managementView.getComponentsForType(componentType);
- if (components == null || components.isEmpty())
- {
- LOG.warn("No components of type [" + componentType + "]
found.");
- continue;
- }
- if (componentType.getSubtype().equals("*"))
- {
- for (ManagedComponent component : components)
- addComponentToDescriptor(pluginDescriptor, component);
- }
- else
- {
- // Use the first one as a representative sample of the type.
- ManagedComponent component = components.iterator().next();
- addComponentToDescriptor(pluginDescriptor, component);
- }
- }
- }
-
- private static void addComponentToDescriptor(PluginDescriptor pluginDescriptor,
ManagedComponent component)
- {
- // First convert ManagedComponent to ResourceType...
- ResourceType resourceType =
MetadataConversionUtils.convertComponentToResourceType(component);
- // Then convert ResourceType to JAXB ServiceDescriptor object.
- convertAndMergeResourceType(pluginDescriptor, resourceType);
- }
-
- private static void convertAndMergeResourceType(PluginDescriptor pluginDescriptor,
ResourceType resourceType)
- {
- List<ServiceDescriptor> services = pluginDescriptor.getServices();
- ServiceDescriptor serviceDescriptor = new ServiceDescriptor();
- serviceDescriptor.setName(resourceType.getName());
- if (resourceType.isSingleton())
- serviceDescriptor.setSingleton(resourceType.isSingleton());
- // TODO: Handle remaining fields.
- convertAndMergeOperationDefinitions(resourceType, serviceDescriptor);
- convertAndMergeMetricDefinitions(resourceType, serviceDescriptor);
- convertAndMergeResourceConfiguration(resourceType, serviceDescriptor);
- services.add(serviceDescriptor);
- }
-
- private static void convertAndMergeResourceConfiguration(ResourceType resourceType,
ServiceDescriptor serviceDescriptor)
- {
- ConfigurationDefinition resourceConfigDef =
resourceType.getResourceConfigurationDefinition();
- ConfigurationDescriptor resourceConfigDescriptor =
convertConfigurationDefinitionToConfigurationDescriptor(
- resourceConfigDef);
- serviceDescriptor.setResourceConfiguration(resourceConfigDescriptor);
- }
-
- private static void convertAndMergeMetricDefinitions(ResourceType resourceType,
ServiceDescriptor serviceDescriptor)
- {
- List<MetricDescriptor> metricDescriptors = serviceDescriptor.getMetric();
- for (MeasurementDefinition metricDef : resourceType.getMetricDefinitions())
- {
- MetricDescriptor metricDescriptor = new MetricDescriptor();
- metricDescriptors.add(metricDescriptor);
- if (metricDef.getCategory() != null)
-
metricDescriptor.setCategory(metricDef.getCategory().name().toLowerCase());
- metricDescriptor.setDataType(metricDef.getDataType().name().toLowerCase());
- metricDescriptor.setDefaultInterval(new
BigInteger(String.valueOf(metricDef.getDefaultInterval())));
- metricDescriptor.setDefaultOn(metricDef.isDefaultOn());
- metricDescriptor.setDescription(metricDef.getDescription());
- metricDescriptor.setDestinationType(metricDef.getDestinationType());
- metricDescriptor.setDisplayName(metricDef.getDisplayName());
- if (metricDef.getDisplayType() != null)
-
metricDescriptor.setDisplayType(metricDef.getDisplayType().name().toLowerCase());
- if (metricDef.getNumericType() != null)
-
metricDescriptor.setMeasurementType(metricDef.getNumericType().name().toLowerCase());
- metricDescriptor.setProperty(metricDef.getName());
- //metricDescriptor.setUnits(metricDef.getUnits()); // TODO
- }
- }
-
- private static void convertAndMergeOperationDefinitions(ResourceType resourceType,
ResourceDescriptor resourceDescriptor)
- {
- List<OperationDescriptor> operationDescriptors =
resourceDescriptor.getOperation();
- for (OperationDefinition opDef : resourceType.getOperationDefinitions())
- {
- OperationDescriptor operationDescriptor = new OperationDescriptor();
- operationDescriptors.add(operationDescriptor);
- operationDescriptor.setDescription(opDef.getDescription());
- operationDescriptor.setDisplayName(opDef.getDisplayName());
- operationDescriptor.setName(opDef.getName());
- ConfigurationDefinition paramsConfigDef =
opDef.getParametersConfigurationDefinition();
- ConfigurationDescriptor paramsConfigDescriptor =
convertConfigurationDefinitionToConfigurationDescriptor(paramsConfigDef);
- operationDescriptor.setParameters(paramsConfigDescriptor);
- ConfigurationDefinition resultsConfigDef =
opDef.getResultsConfigurationDefinition();
- ConfigurationDescriptor resultsConfigDescriptor =
convertConfigurationDefinitionToConfigurationDescriptor(resultsConfigDef);
- operationDescriptor.setResults(resultsConfigDescriptor);
- operationDescriptor.setTimeout(opDef.getTimeout());
- }
- }
-
- private static ConfigurationDescriptor
convertConfigurationDefinitionToConfigurationDescriptor(
- ConfigurationDefinition configDef)
- {
- if (configDef == null)
- return null;
- ConfigurationDescriptor configDescriptor = new ConfigurationDescriptor();
- configDescriptor.setNotes(configDef.getDescription());
- for (PropertyDefinition propDef : configDef.getPropertyDefinitions().values())
- {
- ConfigurationProperty configProp =
convertPropertyDefinitionToConfigurationProperty(propDef);
- JAXBElement propElement = getJAXBElement(configProp);
- configDescriptor.getConfigurationProperty().add(propElement);
- }
- return configDescriptor;
- }
-
- private static ConfigurationProperty
convertPropertyDefinitionToConfigurationProperty(PropertyDefinition propDef)
- {
- ConfigurationProperty configProp;
- if (propDef instanceof PropertyDefinitionSimple)
- {
- PropertyDefinitionSimple propDefSimple = (PropertyDefinitionSimple)propDef;
- SimpleProperty simpleProp = new SimpleProperty();
- simpleProp.setDefaultValue(propDefSimple.getDefaultValue());
- simpleProp.setDefaultValueDescription(propDefSimple.getDefaultValue());
- simpleProp.setInitialValue(propDefSimple.getDefaultValue());
- if (propDefSimple.getType() != PropertySimpleType.STRING)
- simpleProp.setType(TYPE_MAP.get(propDefSimple.getType()));
- configProp = simpleProp;
- }
- else if (propDef instanceof PropertyDefinitionList)
- {
- PropertyDefinitionList propDefList = (PropertyDefinitionList)propDef;
- ListProperty listProp = new ListProperty();
- //listProp.setMin(BigInteger.valueOf(propDefList.getMin()));
- //listProp.setMax(String.valueOf(propDefList.getMax()));
- ConfigurationProperty memberConfigProp =
convertPropertyDefinitionToConfigurationProperty(
- propDefList.getMemberDefinition());
- JAXBElement propElement = getJAXBElement(memberConfigProp);
- listProp.setConfigurationProperty(propElement);
- configProp = listProp;
- }
- else if (propDef instanceof PropertyDefinitionMap)
- {
- PropertyDefinitionMap propDefMap = (PropertyDefinitionMap)propDef;
- MapProperty mapProp = new MapProperty();
- for (PropertyDefinition itemPropDef : propDefMap.getPropertyDefinitions())
- {
- ConfigurationProperty itemConfigProp =
convertPropertyDefinitionToConfigurationProperty(itemPropDef);
- JAXBElement propElement = getJAXBElement(itemConfigProp);
- mapProp.getConfigurationProperty().add(propElement);
- }
- configProp = mapProp;
- }
- else
- {
- throw new IllegalStateException("Invalid property definition type:
" + propDef.getClass().getName());
- }
- configProp.setDescription(propDef.getDescription());
- //simpleProp.setActivationPolicy(propDefSimple.getActivationPolicy()); // TODO
- configProp.setName(propDef.getName());
- //simpleProp.setPropertyOptions(); // TODO
- if (propDef.isReadOnly())
- configProp.setReadOnly(propDef.isReadOnly());
- if (!propDef.isRequired())
- configProp.setRequired(propDef.isRequired());
- if (propDef.isSummary())
- configProp.setSummary(propDef.isSummary());
- //simpleProp.setUnits(propDefSimple.getUnits()); // TODO
- return configProp;
- }
-
- private static JAXBElement<? extends ConfigurationProperty>
getJAXBElement(ConfigurationProperty configProp)
- {
- JAXBElement<? extends ConfigurationProperty> propElement;
- QName qname;
- if (configProp instanceof SimpleProperty)
- qname = SIMPLE_PROPERTY_QNAME;
- else if (configProp instanceof ListProperty)
- qname = LIST_PROPERTY_QNAME;
- else if (configProp instanceof MapProperty)
- qname = MAP_PROPERTY_QNAME;
- else
- throw new IllegalStateException();
- propElement = new JAXBElement(qname, configProp.getClass(), configProp);
- return propElement;
- }
-
- private static Set<String> getKnownDeploymentTypeNames()
- {
- // Use a TreeSet so the names will be sorted.
- Set<String> knownDeploymentTypeNames = new TreeSet<String>();
- for (KnownDeploymentTypes type : KnownDeploymentTypes.values())
- {
- knownDeploymentTypeNames.add(type.getType());
- }
- return knownDeploymentTypeNames;
- }
-
- private static void writeToFile(PluginDescriptor pluginDescriptor,
- File file)
- throws Exception
- {
- LOG.info("Writing plugin descriptor to [" + file + "]...");
- OutputStream outputStream = new BufferedOutputStream(new
FileOutputStream(file));
- try {
- JAXBContext jaxbContext =
JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
- Marshaller marshaller = jaxbContext.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper",
new RhqNamespacePrefixMapper());
- marshaller.marshal(pluginDescriptor, outputStream);
- } finally {
- outputStream.close();
- }
- }
-}
diff --git
a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java
b/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java
deleted file mode 100644
index 3489912..0000000
---
a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.jboss.jopr.tool.jbas5;
-
-import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
-
-/**
- * @author Ian Springer
- */
-public class RhqNamespacePrefixMapper extends NamespacePrefixMapper {
- public static final String PLUGIN_NAMESPACE = "urn:xmlns:rhq-plugin";
- public static final String CONFIGURATION_NAMESPACE =
"urn:xmlns:rhq-configuration";
-
- public String getPreferredPrefix(String namespaceUri, String suggestion, boolean
requirePrefix) {
- if (namespaceUri.equals(PLUGIN_NAMESPACE)) {
- return "";
- } else if (namespaceUri.equals(CONFIGURATION_NAMESPACE)) {
- return "c";
- } else {
- return null;
- }
- }
-}
commit c8df0fbe5ac87ad2e5d5a731d29d64ed6c6b4494
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 28 09:50:09 2012 +0100
Get rid of the never really working JBossOSGI plugin - especially as the JBossOSGi
project is long dead anyway.
diff --git a/modules/plugins/JBossOSGi/pom.xml b/modules/plugins/JBossOSGi/pom.xml
deleted file mode 100644
index 1ca9b1b..0000000
--- a/modules/plugins/JBossOSGi/pom.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-<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>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-jbossOsgi-plugin</artifactId>
- <packaging>jar</packaging>
-
- <name>JBossOSGi Plugin</name>
- <description>Plugin to Manage JBossOSGi services</description>
-
-
- <profiles>
- <profile>
- <id>dev</id>
-
- <properties>
- <rhq.rootDir>../../..</rhq.rootDir>
-
<rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-
<rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
-
- <groupId>org.osgi</groupId>
-
<artifactId>org.osgi.core</artifactId>
- <version>r4v41</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.osgi</groupId>
-
<artifactId>org.osgi.compendium</artifactId>
- <version>r4v41</version>
- </artifactItem>
-
- <artifactItem>
-
<groupId>org.jboss.osgi</groupId>
-
<artifactId>jboss-osgi-spi</artifactId>
- <version>1.0.0.Beta1</version>
-
- </artifactItem>
- </artifactItems>
-
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
-
- <execution>
- <id>deploy</id>
- <phase>compile</phase>
- <configuration>
- <target>
- <mkdir
dir="${rhq.deploymentDir}"/>
- <property name="deployment.file"
-
location="${rhq.deploymentDir}/${project.build.finalName}.jar"/>
- <echo>*** Updating
${deployment.file}...</echo>
- <jar destfile="${deployment.file}"
basedir="${project.build.outputDirectory}"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>deploy-jar-meta-inf</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="deployment.file"
-
location="${rhq.deploymentDir}/${project.build.finalName}.jar"/>
- <echo>*** Updating META-INF dir in
${deployment.file}...</echo>
- <unjar
src="${project.build.directory}/${project.build.finalName}.jar"
-
dest="${project.build.outputDirectory}">
- <patternset>
- <include
name="META-INF/**"/>
- </patternset>
- </unjar>
- <jar destfile="${deployment.file}"
-
manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
- update="true">
- </jar>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>undeploy</id>
- <phase>clean</phase>
- <configuration>
- <target>
- <property name="deployment.file"
-
location="${rhq.deploymentDir}/${project.build.finalName}.jar"/>
- <echo>*** Deleting
${deployment.file}...</echo>
- <delete
file="${deployment.file}"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
- </profiles>
-
-
- <dependencies>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-plugin-api</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-native-system</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-jmx-plugin</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>r4v41</version>
- </dependency>
-
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>r4v41</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-spi</artifactId>
- <version>1.0.0.Beta1</version>
- </dependency>
-
- <!-- TODO add your dependencies here -->
-
- </dependencies>
-</project>
diff --git
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java
b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java
deleted file mode 100644
index 9d96ab0..0000000
---
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
-import org.mc4j.ems.connection.bean.operation.EmsOperation;
-import static org.osgi.framework.Bundle.ACTIVE;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementDataTrait;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/**
- * Component class for a single OSGi Bundle
- *
- * @author Heiko W. Rupp
- */
-public class BundleComponent implements
ResourceComponent<JBossOsgiServerComponent>, OperationFacet, MeasurementFacet {
-
- private final Log log = LogFactory.getLog(BundleComponent.class);
-
- ResourceContext context;
- JBossOsgiServerComponent parentComponent;
-
- public void start(ResourceContext<JBossOsgiServerComponent> resourceContext)
throws Exception {
- context = resourceContext;
- parentComponent = resourceContext.getParentResourceComponent();
- }
-
- public void stop() {
- }
-
- public AvailabilityType getAvailability() {
-
- AvailabilityType res = AvailabilityType.DOWN;
-
- EmsBean bean = getBean();
- EmsAttribute att = bean.getAttribute("state");
- try {
- Integer code = (Integer) att.refresh();
- if (code != null && code == ACTIVE)
- res = AvailabilityType.UP;
- }
- catch (Exception e) {
- // Nothing to do here
- }
-
- return res;
- }
-
-
- public OperationResult invokeOperation(String name, Configuration params) throws
Exception {
-
- EmsBean bean = getBean();
-
- Object[] para ;
- if ("getProperty".equals(name)) {
- para = new Object[1];
- para[0] = params.getSimple("name").getStringValue();
- }
- else {
- para = new Object[0];
- }
- if (log.isDebugEnabled())
- log.debug("Trying to invoke operation [" + name + "] on
[" + context.getResourceKey() + "]");
- EmsOperation ops = bean.getOperation(name);
- Object res = null;
- if (ops!=null) {
- res = ops.invoke(para);
-
- }
- OperationResult result = new OperationResult();
- if (res!=null)
- result.setSimpleResult((String) res); // TODO cast will be bad for other
return types than string
-
- // If this is a lifecycle operation ask for an avail check
- boolean availCheck = name.toLowerCase().equals("stop") ||
name.toLowerCase().contains("start");
- if (availCheck) {
- getResourceContext().getAvailabilityContext().requestAvailabilityCheck();
- }
-
- return result;
- }
-
- public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest>
metrics) throws Exception {
-
- EmsBean bean = getBean();
- List<String> theMetrics = new ArrayList<String>(metrics.size());
- for (MeasurementScheduleRequest msr : metrics)
- theMetrics.add(msr.getName());
-
- bean.refreshAttributes(theMetrics);
-
- for (MeasurementScheduleRequest msr : metrics) {
- EmsAttribute attribute = bean.getAttribute(msr.getName());
- if (attribute==null)
- continue;
-
- if (msr.getDataType() == DataType.MEASUREMENT) {
- Double value = (Double) attribute.getValue();
- MeasurementDataNumeric data = new MeasurementDataNumeric(msr,value);
- report.addData(data);
- }
- else if (msr.getDataType() == DataType.TRAIT) {
- String value = (String) attribute.getValue();
- MeasurementDataTrait data = new MeasurementDataTrait(msr,value);
- report.addData(data);
- }
- }
- }
-
-
-
- private EmsBean getBean() {
- EmsConnection conn = parentComponent.getEmsConnection();
- return conn.getBean(context.getResourceKey());
- }
-
-}
diff --git
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java
b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java
deleted file mode 100644
index 88406f5..0000000
---
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.plugins.jmx.ObjectNameQueryUtility;
-
-/**
- * Discovery Class for OSGi Bundles
- *
- * @author Heiko W. Rupp
- */
-public class BundleDiscovery implements
ResourceDiscoveryComponent<JBossOsgiServerComponent> {
-
- private final Log log = LogFactory.getLog(BundleDiscovery.class);
-
- public Set<DiscoveredResourceDetails> discoverResources(
- ResourceDiscoveryContext<JBossOsgiServerComponent> ctx) throws
Exception {
-
- Set<DiscoveredResourceDetails> details = new
HashSet<DiscoveredResourceDetails>();
-
- String objectNamePattern="jboss.osgi:bundle=%name%,id=%id%";
-
- ObjectNameQueryUtility queryUtility = new
ObjectNameQueryUtility(objectNamePattern);
-
- EmsConnection conn =
ctx.getParentResourceComponent().getEmsConnection(ctx.getParentResourceContext().getPluginConfiguration());
- List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
-
- for (EmsBean bean: beans) {
-
- queryUtility.setMatchedKeyValues(bean.getBeanName().getKeyProperties());
- //Skip unknown beans
- if
(queryUtility.isContainsExtraKeyProperties(bean.getBeanName().getKeyProperties().keySet()))
- continue;
-
- String resourceKey = bean.getBeanName().getCanonicalName(); // The detected
object name
- String name = queryUtility.formatMessage("{name}");
-
- DiscoveredResourceDetails detail = new
DiscoveredResourceDetails(ctx.getResourceType(),
- resourceKey,
- name,
- null,
- "An OSGiBundle",
- null,
- null);
- details.add(detail);
-
- }
-
- log.info("Discovered " + details.size() +" bundles");
-
- return details;
- }
-}
diff --git
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java
b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java
deleted file mode 100644
index bef0f79..0000000
---
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java
+++ /dev/null
@@ -1,277 +0,0 @@
-
-package org.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.ConnectionFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-import org.mc4j.ems.connection.settings.ConnectionSettings;
-import org.mc4j.ems.connection.support.ConnectionProvider;
-import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.event.EventContext;
-import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.operation.OperationContext;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.plugins.jmx.JMXDiscoveryComponent;
-
-public class JBossOsgiServerComponent implements ResourceComponent
-, OperationFacet
-, CreateChildResourceFacet
-{
- private final Log log = LogFactory.getLog(this.getClass());
-
- private static final int CHANGEME = 1; // TODO remove or change this
-
- private EmsConnection connection;
-
- ResourceContext resourceContext;
-
- public static final String EVENT_TYPE_LOG = "log"; // See plugin
descriptor
- private EventContext eventContext;
- private OsgiEventPoller eventPoller;
-
- /**
- * Controls the dampening of connection error stack traces in an attempt to control
spam to the log
- * file. Each time a connection error is encountered, this will be incremented. When
the connection
- * is finally established, this will be reset to zero.
- */
- private int consecutiveConnectionErrors;
-
-
-
- /**
- * Return availability of this resource
- * @see org.rhq.core.pluginapi.inventory.ResourceComponent#getAvailability()
- */
- public AvailabilityType getAvailability() {
- try {
- EmsConnection connection =
loadConnection(resourceContext.getPluginConfiguration());
- EmsBean bean = connection.getBean(JBossOsgiServerDiscovery.MANAGER_OBJECT);
-
- // this is necessary to prove that that not only the connection exists but is
servicing requests.
- bean.getAttribute("bundles").refresh();
- return AvailabilityType.UP;
- } catch (Exception e) {
- closeConnection();
- return AvailabilityType.DOWN;
- }
- }
-
-
-
- /**
- * Start the resource connection
- * @see
org.rhq.core.pluginapi.inventory.ResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
- */
- public void start(ResourceContext context) throws
InvalidPluginConfigurationException, Exception {
-
- resourceContext = context;
-
- Configuration conf = context.getPluginConfiguration();
- // TODO add code to start the resource / connection to it
-
-
- // Register getting remote log events
- eventContext = context.getEventContext();
- eventPoller = new OsgiEventPoller();
- eventContext.registerEventPoller(eventPoller, 60);
-
- }
-
-
- /**
- * Tear down the rescource connection
- * @see org.rhq.core.pluginapi.inventory.ResourceComponent#stop()
- */
- public void stop() {
-
- if (eventPoller!=null)
- eventPoller.tearDown();
- eventContext.unregisterEventPoller(EVENT_TYPE_LOG);
- }
-
-
-
-
-
- public void startOperationFacet(OperationContext context) {
-
- }
-
-
- /**
- * Invokes the passed operation on the managed resource
- * @param name Name of the operation
- * @param params The method parameters
- * @return An operation result
- * @see org.rhq.core.pluginapi.operation.OperationFacet
- */
- public OperationResult invokeOperation(String name, Configuration params) throws
Exception {
-
- OperationResult res = new OperationResult();
- if ("dummyOperation".equals(name)) {
- // TODO implement me
-
- }
- return res;
- }
-
-
-
- /**
- * Create a child resource
- * @see org.rhq.core.pluginapi.inventory.CreateChildResourceFacet
- */
- public CreateResourceReport createResource(CreateResourceReport report)
- {
- // TODO supply code to create a child resource
-
- return null; // TODO change this
- }
-
- public EmsConnection getEmsConnection() {
- EmsConnection emsConnection = null;
-
- try {
- emsConnection = loadConnection(resourceContext.getPluginConfiguration());
- } catch (Exception e) {
- log.error("Component attempting to access a connection that could not be
loaded");
- }
-
- return emsConnection;
- }
-
-
-
- public EmsConnection getEmsConnection(Configuration config) {
- EmsConnection emsConnection = null;
-
- try {
- emsConnection = loadConnection(config);
- } catch (Exception e) {
- log.error("Component attempting to access a connection that could not be
loaded");
- }
-
- return emsConnection;
- }
-
- /**
- * This is the preferred way to use a connection from within this class; methods
should not access the connection
- * property directly as it may not have been instantiated if the connection could not
be made.
- *
- * <p>If the connection has already been established, return the object
reference to it. If not, attempt to make
- * a live connection to the JMX server.</p>
- *
- * <p>If the connection could not be made in the {@link
#start(org.rhq.core.pluginapi.inventory.ResourceContext)}
- * method, this method will effectively try to load the connection on each attempt to
use it. As such, multiple
- * threads may attempt to access the connection through this means at a time.
Therefore, the method has been
- * made synchronized on instances of the class.</p>
- *
- * <p>If any errors are encountered, this method will log the error, taking
into account logic to prevent spamming
- * the log file. Calling methods should take care to not redundantly log the
exception thrown by this method.</p>
- *
- * @return live connection to the JMX server; this will not be
<code>null</code>
- *
- * @throws Exception if there are any issues at all connecting to the server
- * @param pluginConfig
- */
- private synchronized EmsConnection loadConnection(Configuration pluginConfig) throws
Exception {
- if (this.connection == null) {
- try {
- //Configuration pluginConfig =
this.resourceContext.getPluginConfiguration();
-
- ConnectionSettings connectionSettings = new ConnectionSettings();
-
- String connectionTypeDescriptorClass =
pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
- .getStringValue();
- PropertySimple serverUrl = pluginConfig
- .getSimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY);
-
- connectionSettings.initializeConnectionType((ConnectionTypeDescriptor)
Class.forName(
- connectionTypeDescriptorClass).newInstance());
- // if not provided use the default serverUrl
- if (null != serverUrl) {
- connectionSettings.setServerUrl(serverUrl.getStringValue());
- }
-
-//
connectionSettings.setPrincipal(pluginConfig.getSimpleValue(PRINCIPAL_CONFIG_PROP,
null));
-//
connectionSettings.setCredentials(pluginConfig.getSimpleValue(CREDENTIALS_CONFIG_PROP,
null));
-
- if (connectionSettings.getAdvancedProperties() == null) {
- connectionSettings.setAdvancedProperties(new Properties());
- }
-
- ConnectionFactory connectionFactory = new ConnectionFactory();
-
-
- ConnectionProvider connectionProvider =
connectionFactory.getConnectionProvider(connectionSettings);
- this.connection = connectionProvider.connect();
-
- this.connection.loadSynchronous(false); // this loads all the MBeans
-
- this.consecutiveConnectionErrors = 0;
-
- if (log.isDebugEnabled())
- log.debug("Successfully made connection to the OSGiServer
instance");
- } catch (Exception e) {
-
- // The connection will be established even in the case that the principal
cannot be authenticated,
- // but the connection will not work. That failure seems to come from the
call to loadSynchronous after
- // the connection is established. If we get to this point that an
exception was thrown, close any
- // connection that was made and null it out so we can try to establish it
again.
- if (connection != null) {
- if (log.isDebugEnabled())
- log.debug("Connection created but an exception was thrown.
Closing the connection.", e);
- connection.close();
- connection = null;
- }
-
- // Since the connection is attempted each time it's used, failure to
connect could result in log
- // file spamming. Log it once for every 10 consecutive times it's
encountered.
- if (consecutiveConnectionErrors % 10 == 0) {
- log.warn("Could not establish connection to the JBossOSGi
instance ["
- + (consecutiveConnectionErrors + 1) + "] times for resource
["
- + resourceContext.getResourceKey() + "]", e);
- }
-
- if (log.isDebugEnabled())
- log.debug("Could not connect to the JBoss instance for resource
["
- + resourceContext.getResourceKey() + "]", e);
-
- consecutiveConnectionErrors++;
-
- throw e;
- }
- }
-
- return connection;
- }
-
-
- /**
- * If necessary attempt to close the EMS connection, then set this.connection null.
Synchronized ensure we play well
- * with loadConnection.
- */
- public synchronized void closeConnection() {
- if (this.connection != null) {
- try {
- this.connection.close();
- } catch (Exception e) {
- log.error("Error closing Tomcat EMS connection: " + e);
- }
- this.connection = null;
- }
- }
-}
\ No newline at end of file
diff --git
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java
b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java
deleted file mode 100644
index 41a19b6..0000000
---
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.plugins.jmx.JMXDiscoveryComponent;
-
-/**
- * Discovery class for JBossOSGi servers
- * @author Heiko W. Rupp
- *
- * implements ResourceDiscoveryComponent<JBossOsgiServerComponent>
- */
-public class JBossOsgiServerDiscovery implements ResourceDiscoveryComponent {
-
-
- private final Log log = LogFactory.getLog(this.getClass());
- public static final String MANAGER_OBJECT =
"jboss.osgi:service=ManagedFramework";
-
- /**
- * Run the discovery
- */
- public Set<DiscoveredResourceDetails>
discoverResources(ResourceDiscoveryContext discoveryContext) {
-
- Set<DiscoveredResourceDetails> discoveredResources = new
HashSet<DiscoveredResourceDetails>();
-
- String remote =
"service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector";
- String connector =
"org.mc4j.ems.connection.support.metadata.J2SE5ConnectionTypeDescriptor";
-
-
- Configuration c = new Configuration();
- c.put(new
PropertySimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY,remote));
- c.put(new PropertySimple(JMXDiscoveryComponent.CONNECTION_TYPE,connector));
- c.put(new PropertySimple("objectName", MANAGER_OBJECT));
-
- boolean found = testConnection(c);
- if (found) {
- String simplifiedRemote = simplifyUrl(remote);
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
discoveryContext.getResourceType(),
- remote, "JBossOSGi @ " + simplifiedRemote , null,
"JBossOSGi Server", c, null);
-
-
- // Add to return values
- discoveredResources.add(detail);
- log.info("Discovered new JBossOSGi server :" + remote);
- }
- return discoveredResources;
-
- }
-
- /**
- * Fiddle host:port from the service string for the resource name that will be
displayed. If input is null,
- * null will be returned.
- * @param remote Input jmx-remote service url.
- * @return short version of the input if anything goes wrong
- */
- private String simplifyUrl(String remote) {
- if (remote==null)
- return null;
-
- if (remote.indexOf("rmi://")==-1) // Nothing to do
- return remote;
-
- int i = remote.lastIndexOf("rmi://");
- i+=6;
- if (i>remote.length())
- return remote;
-
- String res = remote.substring(i);
- i = res.indexOf("/");
- if (i>0)
- res = res.substring(0,i);
-
- return res;
- }
-
- /**
- * Try to establish a connection to the given remote and search for the
managerObject
- * @param config Configuration data to set up the remote connection
- * @return true if the connetion is successful and the MBean could be found
- */
- private boolean testConnection(Configuration config) {
-
- boolean res=false;
-
- try {
- JBossOsgiServerComponent c = new JBossOsgiServerComponent();
- EmsConnection conn = c.getEmsConnection(config);
- EmsBean managerBean = conn.getBean(MANAGER_OBJECT);
- managerBean.getAttribute("bundles").refresh();
- res = true;
- }
- catch (Exception e) {
- // Nothing to do
- }
-
- return res;
- }
-}
\ No newline at end of file
diff --git
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java
b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java
deleted file mode 100644
index f9cf093..0000000
---
a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.List;
-import java.util.Set;
-import java.util.HashSet;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jetbrains.annotations.NotNull;
-import org.osgi.service.log.LogEntry;
-import org.osgi.service.log.LogService;
-
-import org.jboss.osgi.spi.logging.LogEntryCache;
-import org.jboss.osgi.spi.logging.LogEntryFilter;
-
-import org.rhq.core.pluginapi.event.EventPoller;
-import org.rhq.core.domain.event.Event;
-import org.rhq.core.domain.event.EventSeverity;
-
-/**
- * Remotely poll the logs from the JBossOSGi server and feed into the
- * Events subsystem.
- *
- * @author Heiko W. Rupp
- */
-public class OsgiEventPoller implements EventPoller{
-
- private final Log log = LogFactory.getLog(OsgiEventPoller.class);
- private LogEntryCache entryCache;
-
- public OsgiEventPoller() {
- entryCache = new LogEntryCache();// new LogEntryFilter(".*"),
LogService.LOG_INFO, ".*");
- // TODO register with the remote
- }
-
-
- public void tearDown() {
-
- }
-
- @NotNull
- public String getEventType() {
- return JBossOsgiServerComponent.EVENT_TYPE_LOG;
- }
-
- public Set<Event> poll() {
- Set<Event> eventSet = new HashSet<Event>();
- List<LogEntry> entries = entryCache.getLog();
- for (LogEntry entry: entries ) {
- StringBuilder builder = new StringBuilder();
- builder.append(entry.getMessage());
- if (entry.getBundle()!=null)
- builder.append("\nBundle:
").append(entry.getBundle().getSymbolicName());
- if (entry.getException()!=null)
- builder.append("\nTrace: ").append(entry.getException());
-
- Event event = new
Event(getEventType(),"RemoteServer",entry.getTime(),
- levelToSeverity(entry.getLevel()),builder.toString());
- eventSet.add(event);
- }
- return eventSet;
- }
-
-
- /**
- * Translate the OSGi log levels into Jopr EventSeverity
- * @param level OSGi Log level
- * @return Corresonding EventSeverity
- * @see org.osgi.service.log.LogService
- */
- private EventSeverity levelToSeverity(int level) {
- EventSeverity ret;
- switch (level) {
- case 1: ret = EventSeverity.ERROR;
- break;
- case 2: ret = EventSeverity.WARN;
- break;
- case 3: ret = EventSeverity.INFO;
- break;
- case 4: ret = EventSeverity.DEBUG;
- break;
- default:
- ret = EventSeverity.INFO;
- log.warn("Got an unknown log level: " + level);
- }
- return ret;
- }
-}
diff --git a/modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml
deleted file mode 100644
index b7155cd..0000000
--- a/modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<plugin name="JBossOSGi"
- displayName="JBossOSGiPlugin"
- package="org.jboss.on.plugins.jbossOsgi.JBossOSGi"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <depends plugin="JMX"/>
-
- <server
- name="JBossOSGi"
- discovery="JBossOsgiServerDiscovery"
- class="JBossOsgiServerComponent"
- createDeletePolicy="create-only"
- >
-
- <plugin-configuration>
- <c:simple-property name="connectorAddress" description="JMX
Remoting address of the remote JBossOSGi Server" />
- <c:template name="default" description="The default setup
for JBossOSGi">
- <c:simple-property name="connectorAddress"
displayName="URL of the remote server"
-
defaultValue="service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector"/>
- </c:template>
- </plugin-configuration>
-
- <operation name="getBundle" description="Retrieve the object
name for the passed bundle name">
- <parameters>
- <c:simple-property name="name" description="Name of the
bundle" type="string"/>
- </parameters>
- <results>
- <c:simple-property name="operationResult"
description="Objectname of the bundle" type="string"/>
- </results>
- </operation>
-
- <event name="log" displayName="Log Entries"
description="Log entries from the OSGi Server" />
-
- <service name="OSGiBundle"
- description="A deployed bundle"
- discovery="BundleDiscovery"
- class="BundleComponent">
- <operation name="start" description="Starts the
bundle" displayName="Start"/>
- <operation name="stop" description="Stops the bundle"
displayName="Stop" />
- <operation name="getProperty" description="Retrieve the
value of the passed property">
- <parameters>
- <c:simple-property name="name" description="Name of
the property" type="string"/>
- </parameters>
- <results>
- <c:simple-property name="operationResult"
description="Value of the property" type="string"/>
- </results>
- </operation>
-
- <metric property="version" dataType="trait"
description="The version of this bundle" displayType="summary"/>
- <metric property="location" dataType="trait"
description="The location of this bundle (in filesystem)"/>
- <metric property="description" dataType="trait"
description="Description of this bundle" displayType="summary" />
-
-
- </service>
-
- </server>
-
-
-</plugin>
\ No newline at end of file
commit 65a12992c9f737af670af4c76b41506a4285341a
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 28 09:48:54 2012 +0100
Get rid of outdated <source>1.5 and <target>1.5 settings.
diff --git a/etc/agentspawn/pom.xml b/etc/agentspawn/pom.xml
index 7896d33..d0cdc63 100644
--- a/etc/agentspawn/pom.xml
+++ b/etc/agentspawn/pom.xml
@@ -28,14 +28,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
diff --git a/etc/classloaders-test/plugin1/pom.xml
b/etc/classloaders-test/plugin1/pom.xml
index 2c405e2..d5a9434 100644
--- a/etc/classloaders-test/plugin1/pom.xml
+++ b/etc/classloaders-test/plugin1/pom.xml
@@ -105,14 +105,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugin-validator</artifactId>
<version>${rhq.version}</version>
diff --git a/etc/classloaders-test/plugin2/pom.xml
b/etc/classloaders-test/plugin2/pom.xml
index a67aff1..914bbff 100644
--- a/etc/classloaders-test/plugin2/pom.xml
+++ b/etc/classloaders-test/plugin2/pom.xml
@@ -104,13 +104,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<plugin>
<groupId>org.rhq</groupId>
diff --git a/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
b/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
index a3e6562..6739e5a 100644
--- a/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
@@ -14,10 +14,10 @@
<name>${rhq-plugin-name}</name>
<description>RHQ Plugin</description>
- <properties>
+ <properties>
<rhq.version>3.0.0.B04</rhq.version>
- </properties>
-
+ </properties>
+
<dependencies>
<!-- Below are the core modules that are required dependencies of all plugins
-->
@@ -68,7 +68,7 @@
<version>2.1</version>
<scope>provided</scope> <!-- provided by the agent/plugin-container
-->
</dependency>
-
+
<!-- Uncomment the one of the three logging systems your plugin uses: log4j,
commons-logging or i18nlog
all three are provided to your plugin by the agent/plugin-container -->
@@ -111,14 +111,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugin-validator</artifactId>
<version>${rhq.version}</version>
diff --git a/etc/samples/custom-serverplugin/pom.xml
b/etc/samples/custom-serverplugin/pom.xml
index 68d76f6..d4e8ab8 100644
--- a/etc/samples/custom-serverplugin/pom.xml
+++ b/etc/samples/custom-serverplugin/pom.xml
@@ -95,13 +95,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<!--
If your plugin has third-party jar dependencies that are not already
diff --git a/etc/samples/simplereport-serverplugin/pom.xml
b/etc/samples/simplereport-serverplugin/pom.xml
index fd219b4..b4855f5 100644
--- a/etc/samples/simplereport-serverplugin/pom.xml
+++ b/etc/samples/simplereport-serverplugin/pom.xml
@@ -88,14 +88,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already
available when deployed in the plugin container, you can package these
diff --git a/etc/samples/skeleton-plugin/pom.xml b/etc/samples/skeleton-plugin/pom.xml
index 6d173ff..e49b30c 100644
--- a/etc/samples/skeleton-plugin/pom.xml
+++ b/etc/samples/skeleton-plugin/pom.xml
@@ -109,14 +109,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already
available when deployed in the plugin
container, you can package these jars in your plugin. They go in your plugin
jar's "lib" directory.
diff --git a/modules/enterprise/server/xml-schemas/pom.xml
b/modules/enterprise/server/xml-schemas/pom.xml
index 49391a9..6494fca 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -130,13 +130,6 @@
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- </configuration>
- </plugin>
</plugins>
</build>
diff --git a/modules/helpers/pluginAnnotations/pom.xml
b/modules/helpers/pluginAnnotations/pom.xml
index 74800f8..929f017 100644
--- a/modules/helpers/pluginAnnotations/pom.xml
+++ b/modules/helpers/pluginAnnotations/pom.xml
@@ -24,14 +24,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index 5c89a0f..f7f04ba 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -23,14 +23,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
diff --git a/modules/plugins/JBossOSGi/pom.xml b/modules/plugins/JBossOSGi/pom.xml
index d2521b1..1ca9b1b 100644
--- a/modules/plugins/JBossOSGi/pom.xml
+++ b/modules/plugins/JBossOSGi/pom.xml
@@ -2,7 +2,7 @@
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>
@@ -19,19 +19,6 @@
<name>JBossOSGi Plugin</name>
<description>Plugin to Manage JBossOSGi services</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
-
- </plugins>
- </build>
<profiles>
<profile>
diff --git a/modules/plugins/hardware/pom.xml b/modules/plugins/hardware/pom.xml
index 875a2a4..ee7beb8 100644
--- a/modules/plugins/hardware/pom.xml
+++ b/modules/plugins/hardware/pom.xml
@@ -15,7 +15,7 @@
<name>Hardware</name>
<description>RHQ Plugin</description>
-
+
<dependencies>
</dependencies>
@@ -23,14 +23,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already
available when deployed in the plugin container, you can package these
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index 36495b8..9c7f6d2 100644
--- a/modules/plugins/hudson/pom.xml
+++ b/modules/plugins/hudson/pom.xml
@@ -31,14 +31,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already
available when deployed in the plugin container, you can package these
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index f14bad8..5e41981 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -17,13 +17,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
diff --git a/modules/plugins/onewire/pom.xml b/modules/plugins/onewire/pom.xml
index ef3a018..8212ff2 100644
--- a/modules/plugins/onewire/pom.xml
+++ b/modules/plugins/onewire/pom.xml
@@ -7,24 +7,17 @@
<groupId>org.rhq</groupId>
<version>4.3.0-SNAPSHOT</version>
</parent>
-
+
<modelVersion>4.0.0</modelVersion>
-
+
<groupId>org.rhq</groupId>
<artifactId>rhq-onewire-plugin</artifactId>
<name>snmptrapd</name>
<description>RHQ OneWire Plugin</description>
-
+
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
+
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
@@ -66,11 +59,11 @@
-->
</executions>
</plugin>
-
-
+
+
</plugins>
</build>
-
+
<profiles>
<profile>
<id>dev</id>
@@ -109,12 +102,12 @@
<phase>package</phase>
<configuration>
<target>
- <property name="deployment.file"
location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <property name="deployment.file"
location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
<echo>*** Updating META-INF dir in
${deployment.file}...</echo>
<unjar
src="${project.build.directory}/${project.build.finalName}.jar"
dest="${project.build.outputDirectory}">
<patternset><include name="META-INF/**"
/></patternset>
</unjar>
- <jar destfile="${deployment.file}"
manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
update="true">
+ <jar destfile="${deployment.file}"
manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
update="true">
</jar>
</target>
</configuration>
@@ -122,7 +115,7 @@
<goal>run</goal>
</goals>
</execution>
-
+
<execution>
<id>undeploy</id>
<phase>clean</phase>
@@ -145,7 +138,7 @@
</build>
</profile>
</profiles>
-
+
<dependencies>
<dependency>
@@ -154,6 +147,6 @@
<version>1.10</version>
</dependency>
</dependencies>
-
+
</project>
diff --git a/modules/plugins/pattern-generator/pom.xml
b/modules/plugins/pattern-generator/pom.xml
index c035714..d4d21f9 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -15,20 +15,6 @@
<name>RHQ pattern Plugin</name>
<description>Generate metrics that follow given patterns</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
-
- </plugins>
- </build>
-
<profiles>
<profile>
<id>dev</id>
diff --git a/modules/plugins/raw-config-test/pom.xml
b/modules/plugins/raw-config-test/pom.xml
index 62b4f33..6788231 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -41,14 +41,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
@@ -60,7 +52,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
diff --git a/modules/plugins/services/pom.xml b/modules/plugins/services/pom.xml
index dbe5b41..37a43cb 100644
--- a/modules/plugins/services/pom.xml
+++ b/modules/plugins/services/pom.xml
@@ -14,18 +14,6 @@
<name>RHQ Services Plugin</name>
<description>Do some System config services stuff</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
<profiles>
<profile>
<id>dev</id>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 42594da..93d093c 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -14,13 +14,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index b627641..4ee1729 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -15,18 +15,6 @@
<name>RHQ Twitter Plugin</name>
<description>Do some Twitter statistics monitoring</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
<profiles>
<profile>
<id>dev</id>
commit e94ba25d2769fff6d371ac5d4e048e3f90531056
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Nov 27 21:59:38 2012 +0100
BZ 880214 - better detect the location of backing files for deployed content.
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
index 1c667da..3cf2cdb 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
@@ -43,6 +43,7 @@ import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
import org.rhq.modules.plugins.jbossas7.json.ReadAttribute;
+import org.rhq.modules.plugins.jbossas7.json.ReadResource;
import org.rhq.modules.plugins.jbossas7.json.Result;
/**
@@ -51,6 +52,7 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
*/
public class DeploymentComponent extends BaseComponent<ResourceComponent<?>>
implements OperationFacet, ContentFacet {
+ private static final String DOMAIN_DATA_CONTENT_SUBDIR = "/data/content";
private boolean verbose = ASConnection.verbose;
private File deploymentFile;
@@ -234,6 +236,17 @@ public class DeploymentComponent extends
BaseComponent<ResourceComponent<?>> imp
}
}
+ /**
+ * Determine the location of the physical content of a deployment.
+ * We need to check several cases here:
+ * <ul>
+ * <li>Standalone server</li>
+ * <li>Domain Deployment: here the content is under /deployment=xxx and in
the filesystem at $AS/domain/data/content</li>
+ * <li>Server-group deployment: there is no real physical content, it is a
logical link to a domain deployment</li>
+ * <li>Manages server: here the content exists below
/host=xx/server=server-name/deployment=xxx</li>
+ * </ul>
+ * @return A file object pointing to the deployed file or null if there is no
content
+ */
private File determineDeploymentFile() {
Operation op = new ReadAttribute(getAddress(), "content");
Result result = getASConnection().execute(op);
@@ -241,8 +254,35 @@ public class DeploymentComponent extends
BaseComponent<ResourceComponent<?>> imp
@SuppressWarnings("unchecked")
List<Map<String, Object>> content = (List<Map<String,
Object>>) result.getResult();
if (content == null || content.isEmpty()) {
- log.warn("Could not determine the location of the deployment - the
content descriptor wasn't found for deployment" + getAddress() + ".");
- return null;
+ // No content -> check for server group
+ if (path.startsWith(("server-group="))) {
+ // Server group has no content of its own - use the domain deployment
+ String name = (String)
path.substring(path.lastIndexOf("=")+1);
+ op = new ReadResource(new Address("deployment",name));
+ result = getASConnection().execute(op);
+ if (result.isSuccess()) {
+ @SuppressWarnings("unchecked")
+ Map<String,Object> contentMap = (Map<String, Object>)
result.getResult();
+ content = (List<Map<String, Object>>)
contentMap.get("content");
+ if (content.get(0).containsKey("path")) {
+ String path = (String) content.get(0).get("path");
+ String relativeTo = (String)
content.get(0).get("relative-to");
+ deploymentFile = getDeploymentFileFromPath(relativeTo, path);
+ } else if (content.get(0).containsKey("hash")) {
+ @SuppressWarnings("unchecked")
+ String base64Hash = ((Map<String,
String>)content.get(0).get("hash")).get("BYTES_VALUE");
+ byte[] hash = Base64.decode(base64Hash);
+ ServerGroupComponent sgc = (ServerGroupComponent)
context.getParentResourceComponent();
+ String baseDir = ((HostControllerComponent)
sgc.context.getParentResourceComponent()).pluginConfiguration.getSimpleValue("baseDir");
+ String contentPath = new File(baseDir ,
"/data/content").getAbsolutePath();
+ deploymentFile = getDeploymentFileFromHash(hash, contentPath);
+ }
+ return deploymentFile;
+ }
+ }
+ else {
+ log.warn("Could not determine the location of the deployment - the
content descriptor wasn't found for deployment" + getAddress() + ".");
+ return null;}
}
Boolean archive = (Boolean) content.get(0).get("archive");
@@ -260,11 +300,34 @@ public class DeploymentComponent extends
BaseComponent<ResourceComponent<?>> imp
@SuppressWarnings("unchecked")
String base64Hash = ((Map<String,
String>)content.get(0).get("hash")).get("BYTES_VALUE");
byte[] hash = Base64.decode(base64Hash);
- Address contentPathAddress = new Address("core-service",
"server-environment");
+ Address contentPathAddress;
+ if (context.getParentResourceComponent() instanceof ManagedASComponent) {
+ // -> managed server we need to check for host=x/server=y, but the
path brings host=x,server-config=y
+ String p = ((ManagedASComponent)
context.getParentResourceComponent()).getPath();
+ p = p.replaceAll("server-config=","server=");
+ contentPathAddress = new Address(p);
+ contentPathAddress.add("core-service",
"server-environment");
+ }
+ else {
+ // standalone
+ contentPathAddress = new Address("core-service",
"server-environment");
+ }
op = new ReadAttribute(contentPathAddress, "content-dir");
result = getASConnection().execute(op);
- String contentPath = (String) result.getResult();
+ String contentPath;
+ if (result.isSuccess()) {
+ contentPath = (String) result.getResult();
+ } else {
+ // No success above -> check if this is a domain deployment
+ if (this instanceof DomainDeploymentComponent) {
+ String baseDir = ((HostControllerComponent)
context.getParentResourceComponent()).pluginConfiguration.getSimpleValue("baseDir");
+ contentPath = new File(baseDir ,
DOMAIN_DATA_CONTENT_SUBDIR).getAbsolutePath();
+ }
+ else {
+ contentPath = "-unknown-";
+ }
+ }
deploymentFile = getDeploymentFileFromHash(hash, contentPath);
} else {
log.warn("Failed to determine the deployment file of " +
getAddress() + " deployment. Neither path nor hash attributes were
available.");
commit 322ff976266655f2bcc809ae4b047f77f170eb1f
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Nov 27 15:04:58 2012 -0500
Add a description to config prop that community member had to figure out
looking at code.
diff --git a/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
index b2d11b9..b6b0cd3 100644
--- a/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
@@ -18,7 +18,8 @@
<c:simple-property name="user" required="false"/>
<c:simple-property name="password"
required="false"/>
<c:simple-property name="realm" required="false"/>
- <c:simple-property name="validateResponseCode"
type="boolean" default="false"/>
+ <c:simple-property name="validateResponseCode"
type="boolean" default="false"
+ description="Codes in the 200-299 range are considered
success"/>
<c:simple-property name="sslProtocol"
default="none">
<c:property-options>
<c:option value="none"/>
commit 5c501ceb548e306ac93ba66b5989cf11e2d91cdb
Merge: a14ee4d 2ec8d54
Author: Jay Shaughnessy <jshaughn(a)jshaughn.csb>
Date: Tue Nov 27 13:39:17 2012 -0500
Merge branch 'master' into rhq-on-as7
Conflicts:
.classpath
modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
modules/enterprise/server/jar/pom.xml
modules/integration-tests/jndi-access/jndi-access-test/pom.xml
pom.xml
diff --cc .classpath
index 4fe0232,e2d8841..4470eb3
--- a/.classpath
+++ b/.classpath
@@@ -173,7 -164,7 +173,6 @@@
<classpathentry kind="src"
path="modules/core/arquillian-integration/container/src/test/java"/>
<classpathentry kind="src"
path="modules/core/arquillian-integration/archive/src/main/java"/>
<classpathentry kind="src"
path="modules/core/arquillian-integration/container/src/main/java"/>
-- <classpathentry kind="src"
path="modules/enterprise/server/itests/src/test/java"/>
<classpathentry kind="src"
path="modules/test-utils/src/main/java"/>
<classpathentry kind="src"
path="modules/integration-tests/mod_cluster-plugin-test/src/test/java"/>
<classpathentry kind="src"
path="etc/samples/skeleton-plugin/src/main/java"/>
@@@ -216,9 -215,12 +215,9 @@@
<classpathentry exported="true" kind="var"
path="M2_REPO/struts-menu/struts-menu/2.3/struts-menu-2.3.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/junit/junit/3.8.2/junit-3.8.2.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/apache/velocity/velocity/1.5/velocity-1.5.jar"/>
- <classpathentry kind="var"
path="M2_REPO/javax/xml/bind/jaxb-api/2.2.3/jaxb-api-2.2.3.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/xalan/xalan/2.5.1/xalan-2.5.1.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/javax/xml/bind/jaxb-api/2.2.3/jaxb-api-2.2.3.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/jboss/jboss-embeddable-ejb3/jboss-ejb3-all/1.0.0.Alpha9/jboss-ejb3-all-1.0.0.Alpha9.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/jboss/jbpm/3.1.1/jbpm-3.1.1.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/jboss/jboss-embeddable-ejb3/hibernate-all/1.0.0.Alpha9/hibernate-all-1.0.0.Alpha9.jar"
sourcepath="/M2_REPO/hibernate/hibernate3/3.2.r14201-2/hibernate3-3.2.r14201-2.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/apache/ant/ant-launcher/1.8.0/ant-launcher-1.8.0.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar"/>
@@@ -235,20 -237,26 +234,20 @@@
<classpathentry exported="true" kind="var"
path="M2_REPO/org/richfaces/framework/richfaces-api/3.3.3.Final/richfaces-api-3.3.3.Final.jar"
sourcepath="/M2_REPO/org/richfaces/framework/richfaces-api/3.1.3.GA/richfaces-api-3.1.3.GA-sources.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/richfaces/framework/richfaces-impl/3.3.3.Final/richfaces-impl-3.3.3.Final.jar"
sourcepath="/M2_REPO/org/richfaces/framework/richfaces-impl/3.3.0.GA/richfaces-impl-3.3.0.GA-sources.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/richfaces/ui/richfaces-ui/3.3.3.Final/richfaces-ui-3.3.3.Final.jar"
sourcepath="/M2_REPO/org/richfaces/ui/richfaces-ui/3.3.0.GA/richfaces-ui-3.3.0.GA-sources.jar"/>
- <classpathentry kind="var"
path="M2_REPO/postgresql/postgresql/9.1-902.jdbc4/postgresql-9.1-902.jdbc4.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/postgresql/postgresql/9.1-902.jdbc4/postgresql-9.1-902.jdbc4.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/jboss/jboss-cache/1.4.1.SP9/jboss-cache-1.4.1.SP9.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar"
sourcepath="/M2_REPO/org/hyperic/sigar/1.6.3.82/sigar-1.6.3.82-sources.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar"
sourcepath="/M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3-sources.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/transaction/jboss-jta/4.2.3.SP5/jboss-jta-4.2.3.SP5.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/transaction/jboss-jts-common/4.2.3.SP5/jboss-jts-common-4.2.3.SP5.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/jbossws-spi/1.1.1.GA/jbossws-spi-1.1.1.GA.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/jbossws/jbossws-native-core/3.1.1.GA/jbossws-native-core-3.1.1.GA.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar"
sourcepath="/M2_REPO/org/hyperic/sigar/1.6.3.82/sigar-1.6.3.82-sources.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/jbossts/jbossjts/4.16.2.Final/jbossjts-4.16.2.Final.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/apache/maven/maven-plugin-api/2.0.8/maven-plugin-api-2.0.8.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/codehaus/swizzle/swizzle-confluence/1.6.1/swizzle-confluence-1.6.1.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jvnet/inflector/0.7.0/inflector-0.7.0.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/net/augeas/augeas/0.0.2/augeas-0.0.2.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/json/json/20090211/json-20090211.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/json/json/20080701/json-20080701.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/org/json/json/20090211/json-20090211.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/net/java/dev/jna/jna/3.2.5/jna-3.2.5.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/freemarker/freemarker/2.3.11/freemarker-2.3.11.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/seam/jboss-seam/2.1.0.SP1/jboss-seam-2.1.0.SP1.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/seam/jboss-seam-ui/2.1.0.SP1/jboss-seam-ui-2.1.0.SP1.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/hibernate/hibernate3/3.2.r14201-2/hibernate3-3.2.r14201-2.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/jline/jline/0.9.94/jline-0.9.94.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/net/sf/opencsv/opencsv/1.8/opencsv-1.8.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/commons-digester/commons-digester/1.8.1/commons-digester-1.8.1.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar"/>
@@@ -279,61 -287,35 +278,61 @@@
<classpathentry exported="true" kind="var"
path="M2_REPO/org/mongodb/mongo-java-driver/2.6.5/mongo-java-driver-2.6.5.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/googlecode/java-diff-utils/diffutils/1.2.1/diffutils-1.2.1.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/google/code/morphia/morphia/0.99/morphia-0.99.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/resteasy/resteasy-links/2.3.4.Final/resteasy-links-2.3.4.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/2.3.4.Final/resteasy-jaxrs-2.3.4.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/resteasy/resteasy-jackson-provider/2.3.4.Final/resteasy-jackson-provider-2.3.4.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/resteasy/jaxrs-api/2.3.4.Final/jaxrs-api-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/hibernate/hibernate-annotations/3.5.6-Final/hibernate-annotations-3.5.6-Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/hibernate/hibernate-core/4.0.1.Final/hibernate-core-4.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/hibernate/hibernate-entitymanager/4.0.1.Final/hibernate-entitymanager-4.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/hibernate/hibernate-validator/4.2.0.Final/hibernate-validator-4.2.0.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/infinispan/infinispan-core/5.1.2.FINAL/infinispan-core-5.1.2.FINAL.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/spec/javax/servlet/jboss-servlet-api_3.0_spec/1.0.1.Final/jboss-servlet-api_3.0_spec-1.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/msc/jboss-msc/1.0.2.GA/jboss-msc-1.0.2.GA.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/jboss-dmr/1.1.1.Final/jboss-dmr-1.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/as/jboss-as-naming/7.1.1.Final/jboss-as-naming-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/as/jboss-as-server/7.1.1.Final/jboss-as-server-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/staxmapper/1.1.0.Final/staxmapper-1.1.0.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/modules/jboss-modules/1.1.1.GA/jboss-modules-1.1.1.GA.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/as/jboss-as-subsystem-test/7.1.1.Final/jboss-as-subsystem-test-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/as/jboss-as-controller/7.1.1.Final/jboss-as-controller-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/as/jboss-as-controller-client/7.1.1.Final/jboss-as-controller-client-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/resteasy/resteasy-links/2.3.4.Final/resteasy-links-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/2.3.4.Final/resteasy-jaxrs-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/resteasy/resteasy-jackson-provider/2.3.4.Final/resteasy-jackson-provider-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/resteasy/jaxrs-api/2.3.4.Final/jaxrs-api-2.3.4.Final.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/sasl/jboss-sasl/1.0.0.Final/jboss-sasl-1.0.0.Final.jar"/>
- <classpathentry exported="true" kind="var"
path="JDK_HOME/lib/tools.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/mockito/mockito-all/1.9.0/mockito-all-1.9.0.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/powermock/powermock-api-mockito/1.4.12/powermock-api-mockito-1.4.12.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/powermock/powermock-core/1.4.12/powermock-core-1.4.12.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/powermock/powermock-api-support/1.4.12/powermock-api-support-1.4.12.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/powermock/powermock-module-testng-common/1.4.12/powermock-module-testng-common-1.4.12.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/powermock/powermock-module-testng/1.4.12/powermock-module-testng-1.4.12.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-api-mockito/1.4.11/powermock-api-mockito-1.4.11.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-core/1.4.11/powermock-core-1.4.11.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-api-support/1.4.11/powermock-api-support-1.4.11.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-module-testng-common/1.4.11/powermock-module-testng-common-1.4.11.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-module-testng/1.4.11/powermock-module-testng-1.4.11.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-api-mockito/1.4.12/powermock-api-mockito-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-core/1.4.12/powermock-core-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-api-support/1.4.12/powermock-api-support-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-module-testng-common/1.4.12/powermock-module-testng-common-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var"
path="M2_REPO/org/powermock/powermock-module-testng/1.4.12/powermock-module-testng-1.4.12.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/liquibase/liquibase-core/2.0.3/liquibase-core-2.0.3.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.0.1/shrinkwrap-impl-base-1.0.1.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-api/1.0.1/shrinkwrap-api-1.0.1.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-spi/1.0.1/shrinkwrap-spi-1.0.1.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0-alpha-3/shrinkwrap-descriptors-api-base-2.0.0-alpha-3.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api/1.0.0-beta-7/shrinkwrap-resolver-api-1.0.0-beta-7.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api-maven/1.0.0-beta-7/shrinkwrap-resolver-api-maven-1.0.0-beta-7.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/arquillian/test/arquillian-test-spi/1.0.1.Final/arquillian-test-spi-1.0.1.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/arquillian/test/arquillian-test-api/1.0.1.Final/arquillian-test-api-1.0.1.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/arquillian/core/arquillian-core-spi/1.0.1.Final/arquillian-core-spi-1.0.1.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/arquillian/core/arquillian-core-api/1.0.1.Final/arquillian-core-api-1.0.1.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/arquillian/container/arquillian-container-spi/1.0.1.Final/arquillian-container-spi-1.0.1.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/arquillian/container/arquillian-container-test-api/1.0.1.Final/arquillian-container-test-api-1.0.1.Final.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/arquillian/testng/arquillian-testng-core/1.0.1.Final/arquillian-testng-core-1.0.1.Final.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1-20120531.064118-1.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.0.1/shrinkwrap-impl-base-1.0.1.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-api/1.0.1/shrinkwrap-api-1.0.1.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-spi/1.0.1/shrinkwrap-spi-1.0.1.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0-alpha-3/shrinkwrap-descriptors-api-base-2.0.0-alpha-3.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api/1.0.0-beta-7/shrinkwrap-resolver-api-1.0.0-beta-7.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api-maven/1.0.0-beta-7/shrinkwrap-resolver-api-maven-1.0.0-beta-7.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/test/arquillian-test-spi/1.0.2.Final/arquillian-test-spi-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/test/arquillian-test-api/1.0.2.Final/arquillian-test-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/core/arquillian-core-spi/1.0.2.Final/arquillian-core-spi-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/core/arquillian-core-api/1.0.2.Final/arquillian-core-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/container/arquillian-container-spi/1.0.2.Final/arquillian-container-spi-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/container/arquillian-container-test-api/1.0.2.Final/arquillian-container-test-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/config/arquillian-config-api/1.0.2.Final/arquillian-config-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/container/arquillian-container-test-impl-base/1.0.2.Final/arquillian-container-test-impl-base-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/arquillian/testng/arquillian-testng-core/1.0.2.Final/arquillian-testng-core-1.0.2.Final.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/byteman/byteman/1.2.1/byteman-1.2.1.jar"/>
- <classpathentry kind="var"
path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1.1-20121031.024335-6.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/2.0.0/jboss-ejb3-ext-api-2.0.0.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/spec/javax/ejb/jboss-ejb-api_3.1_spec/1.0.2.Final/jboss-ejb-api_3.1_spec-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/spec/javax/jms/jboss-jms-api_1.1_spec/1.0.0.Final/jboss-jms-api_1.1_spec-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/spec/javax/interceptor/jboss-interceptors-api_1.1_spec/1.0.0.Final/jboss-interceptors-api_1.1_spec-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/spec/javax/transaction/jboss-transaction-api_1.1_spec/1.0.0.Final/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/remotingjmx/remoting-jmx/1.0.2.Final/remoting-jmx-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/mozilla/rhino/1.7R4/rhino-1.7R4.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/picketbox/picketbox/4.0.7.Final/picketbox-4.0.7.Final.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/org/python/jython-standalone/2.5.2/jython-standalone-2.5.2.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1.1-20121031.024335-6.jar"/>
+ <classpathentry exported="true" kind="var"
path="JDK_HOME/lib/tools.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/joda-time/joda-time/2.1/joda-time-2.1.jar"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
diff --cc pom.xml
index 2d9ee76,f8b3811..9703ef0
--- a/pom.xml
+++ b/pom.xml
@@@ -652,13 -543,29 +651,6 @@@
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- TODO: This is a workaround for the Javac bug requiring annotations to be
- available when compiling dependent classes. It is fixed in JDK 7. -->
- <!-- JPA annotations -->
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <!-- Hibernate annotations -->
- <dependency>
- <groupId>hibernate-annotations</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- JAXB annotations -->
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- end of workaround -->
-
</dependencies>
commit 2ec8d54cba53b668761c044937419a0e458d5a86
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Tue Nov 27 17:15:19 2012 +0100
[BZ-879583] Monitoring : process availability gives wrong status (SIGAR)
Remixed inital fix after review with Lukas
diff --git
a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
index 9e9b95f..c85ec42 100644
---
a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
+++
b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
@@ -107,12 +107,16 @@ public class ProcessComponent implements ResourceComponent,
MeasurementFacet {
}
private ProcessInfo getProcess() throws Exception {
+ if (this.process != null && this.process.isRunning()) {
+ // Refresh existing ProcessInfo when underlying process is apparently
running.
+ // ProcessInfo may hold stale data.
+ // SIGAR objects do not get updated when a process goes down.
+ this.process.refresh();
+ }
if (this.process == null || !this.process.isRunning()) {
+ // Create ProcessInfo for the first time or when the underlying process is no
longer running.
+ // When a process is no longer running we need to make a new PIQL or pid file
discovery.
this.process = getProcessForConfiguration();
- } else {
- // Refresh previously existing ProcessInfo as it may hold stale data.
- // SIGAR objects do not get updated when, for example, a process goes down.
- process.refresh();
}
return this.process;
}
commit a14ee4d0b2fa606aff020ad32edd5af0a91f3eb5
Author: Jay Shaughnessy <jshaughn(a)jshaughn.csb>
Date: Tue Nov 27 10:32:28 2012 -0500
I have a feeling that we're not getting the translations we
expect due to the "default-value" syntax here. These properties
should be set anyway, so eliminate the defaults.
diff --git a/modules/enterprise/server/itests-2/pom.xml
b/modules/enterprise/server/itests-2/pom.xml
index d22d090..f0c179f 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -481,10 +481,8 @@
</datasource>
<!-- FOR RHQ TESTING -->
<datasource jta="false"
jndi-name="java:jboss/datasources/NoTxRHQDS" pool-name="NoTxRHQDS"
enabled="true" use-java-context="true">
-
<connection-url>${rhq.test.ds.connection-url:jdbc:postgresql://127.0.0.1:5432/rhq}</connection-url>
- <connection-property name="char.encoding">
- UTF-8
- </connection-property>
+
<connection-url>${rhq.test.ds.connection-url}</connection-url>
+ <connection-property
name="char.encoding">UTF-8</connection-property>
<driver>postgres</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
@@ -507,15 +505,9 @@
</statement>
</datasource>
<xa-datasource jta="true"
jndi-name="java:jboss/datasources/RHQDS" pool-name="RHQDS"
enabled="true" use-java-context="true">
- <xa-datasource-property name="DatabaseName">
- ${rhq.test.ds.db-name:rhq}
- </xa-datasource-property>
- <xa-datasource-property name="PortNumber">
- ${rhq.test.ds.port:5432}
- </xa-datasource-property>
- <xa-datasource-property name="ServerName">
- ${rhq.test.ds.server-name:127.0.0.1}
- </xa-datasource-property>
+ <xa-datasource-property
name="DatabaseName">${rhq.test.ds.db-name}</xa-datasource-property>
+ <xa-datasource-property
name="PortNumber">${rhq.test.ds.port}</xa-datasource-property>
+ <xa-datasource-property
name="ServerName">${rhq.test.ds.server-name}</xa-datasource-property>
<driver>postgres</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<xa-pool>
@@ -566,10 +558,8 @@
</datasource>
<!-- FOR RHQ TESTING -->
<datasource jta="false"
jndi-name="java:jboss/datasources/NoTxRHQDS" pool-name="NoTxRHQDS"
enabled="true" use-java-context="true">
-
<connection-url>${rhq.test.ds.connection-url:jdbc:oracle:thin:@127.0.0.1:1521:XE}</connection-url>
- <connection-property name="char.encoding">
- UTF-8
- </connection-property>
+
<connection-url>${rhq.test.ds.connection-url}</connection-url>
+ <connection-property
name="char.encoding">UTF-8</connection-property>
<driver>oracle</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
@@ -593,7 +583,7 @@
</statement>
</datasource>
<xa-datasource jta="true"
jndi-name="java:jboss/datasources/RHQDS" pool-name="RHQDS"
enabled="true" use-java-context="true">
- <xa-datasource-property
name="URL">${rhq.test.ds.connection-url:jdbc:oracle:thin:@127.0.0.1:1521:XE}</xa-datasource-property>
+ <xa-datasource-property
name="URL">${rhq.test.ds.connection-url}</xa-datasource-property>
<xa-datasource-property
name="ConnectionProperties">SetBigStringTryClob=true</xa-datasource-property>
<driver>oracle</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
commit abda861b4c4204adca7d08d3449e6d3ba50251f0
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Nov 26 11:07:46 2012 -0500
deleting test code that was just intended for prototyping
JaxbTest was used for some prototyping while I was working on the reports
export feature. It probably was committed on accident.
diff --git
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java
deleted file mode 100644
index e5172f6..0000000
---
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.rhq.enterprise.server.util;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-import org.testng.annotations.Test;
-
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.shared.ResourceBuilder;
-import org.rhq.core.domain.util.PageList;
-
-public class JaxbTest {
-
- @Test
- public void writeFragments() throws Exception {
- Resource resource = new ResourceBuilder()
- .createRandomServer()
- .with(2).randomChildServers()
- .build();
-
- PageList<Resource> resources = new PageList<Resource>();
- resources.add(resource);
- resources.addAll(resource.getChildResources());
-
- JAXBContext context = JAXBContext.newInstance(Resource.class, PageList.class);
- Marshaller marshaller = context.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- System.out.println("<collection>\n");
- for (Resource r : resources) {
- marshaller.marshal(r, System.out);
- }
- System.out.println("</collection>\n");
-
- }
-
-}
commit 0a57f672d2993dd95244f5d38d0c95ddb876caf1
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 26 12:18:17 2012 +0100
Randomizing ports in the JNDI access test. Maybe this will help the test
failures in the integration-tests Jenkins job.
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
index 02be42c..d5a7e45 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
@@ -43,6 +43,7 @@ import org.unitils.thirdparty.org.apache.commons.io.FileUtils;
import org.rhq.core.util.file.FileUtil;
import org.rhq.core.util.stream.StreamUtil;
import org.rhq.plugins.apache.util.HttpdAddressUtility.Address;
+import org.rhq.test.PortScout;
import org.rhq.test.TokenReplacingProperties;
import org.rhq.test.TokenReplacingReader;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
deleted file mode 100644
index 3a33f09..0000000
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-package org.rhq.plugins.apache.util;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.SocketAddress;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Tries to find a series of free ports.
- *
- * The ports remain open until the {@link #close()} method is called.
- *
- * @author Lukas Krejci
- */
-public class PortScout implements Closeable {
-
- private Set<ServerSocket> activeSockets = new HashSet<ServerSocket>();
-
- public int getNextFreePort() throws IOException {
- ServerSocket s = new ServerSocket(0);
- activeSockets.add(s);
- return s.getLocalPort();
- }
-
- @Override
- public void close() throws IOException {
- String message = null;
- for(ServerSocket s : activeSockets) {
- SocketAddress addr = s.getLocalSocketAddress();
- try {
- s.close();
- } catch (IOException e) {
- if (message == null) {
- message = "The following test sockets failed to close while
looking for free ports:\n";
- }
-
- message += addr.toString() + ": " + e.getMessage() +
",\n";
- }
- }
-
- if (message != null) {
- message = message.substring(0, message.length() - 2);
-
- throw new IOException(message);
- }
- }
-}
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
index aed285e..36da98a 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -18,8 +18,6 @@
<rhq.server.datasource>java:/RHQDS</rhq.server.datasource>
<rhq.server.ds-mapping>PostgreSQL</rhq.server.ds-mapping>
<jboss-embeddable-ejb3.version>1.0.0.Alpha9</jboss-embeddable-ejb3.version>
- <jnp.port>54987</jnp.port>
- <jnp.rmiPort>54988</jnp.rmiPort>
</properties>
<dependencies>
@@ -323,8 +321,6 @@
<hibernate.dialect>${rhq.test.ds.hibernate-dialect}</hibernate.dialect>
<clean.db>${clean.db}</clean.db>
<test.server.jar.path>${settings.localRepository}/org/rhq/jndi-access-remote-server/${project.version}/jndi-access-remote-server-${project.version}.jar</test.server.jar.path>
- <jnp.port>${jnp.port}</jnp.port>
- <jnp.rmiPort>${jnp.rmiPort}</jnp.rmiPort>
</systemPropertyVariables>
<argLine>${jacoco.unit-test.args} -Djava.security.manager
-Djava.security.policy==${basedir}/target/test-classes/security.policy</argLine>
<additionalClasspathElements>
diff --git
a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
index e161230..abfd376 100644
---
a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
+++
b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
@@ -48,6 +48,7 @@ import org.rhq.enterprise.client.LocalClient;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
import org.rhq.enterprise.server.util.LookupUtil;
import org.rhq.jndi.AllowRhqServerInternalsAccessPermission;
+import org.rhq.test.PortScout;
/**
*
@@ -57,14 +58,28 @@ import org.rhq.jndi.AllowRhqServerInternalsAccessPermission;
@Test
public class JndiAccessTest extends AbstractEJB3Test {
private static final Log JNP_SERVER_LOG = LogFactory.getLog("Test JNP
Server");
+ private static final Log LOG = LogFactory.getLog(JndiAccessTest.class);
private Process testServerProcess;
private Thread testServerStdErrReader;
private Thread testServerStdOutReader;
+ int jnpPort;
+
@BeforeClass
- @Parameters({"test.server.jar.path", "jnp.port",
"jnp.rmiPort"})
- public void startTestJnpServer(String testServerJar, int jnpPort, int rmiPort) throws
Exception {
+ @Parameters({ "test.server.jar.path" })
+ public void startTestJnpServer(String testServerJar) throws Exception {
+ int rmiPort = 0;
+ PortScout scout = new PortScout();
+
+ try {
+ jnpPort = scout.getNextFreePort();
+ rmiPort = scout.getNextFreePort();
+ } finally {
+ scout.close();
+ }
+
+ LOG.info("Starting the remote JNP server on jnpPort=" + jnpPort +
", rmiPort=" + rmiPort);
ProcessBuilder bld = new ProcessBuilder("java", "-Djnp.port="
+ jnpPort, "-Djnp.rmiPort=" + rmiPort, "-jar", testServerJar);
testServerProcess = bld.start();
@@ -124,8 +139,7 @@ public class JndiAccessTest extends AbstractEJB3Test {
testServerStdOutReader.join();
}
- @Parameters("jnp.port")
- public void testRemoteConnectionWorkingFromJava(int jnpPort) throws Exception {
+ public void testRemoteConnectionWorkingFromJava() throws Exception {
Properties env = new Properties();
env.put("java.naming.factory.initial",
"org.jboss.naming.NamingContextFactory");
env.put("java.naming.provider.url", "jnp://localhost:" +
jnpPort);
@@ -153,8 +167,7 @@ public class JndiAccessTest extends AbstractEJB3Test {
}
}
- @Parameters("jnp.port")
- public void testRemoteJNDILookupWorksFromScripts(int jnpPort) throws Exception {
+ public void testRemoteJNDILookupWorksFromScripts() throws Exception {
Subject overlord = LookupUtil.getSubjectManager().getOverlord();
ScriptEngine engine = getEngine(overlord);
diff --git
a/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
b/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
index ec09ed7..fd832e0 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
@@ -19,7 +19,7 @@
<appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
<errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
- <param name="Threshold" value="WARN"/>
+ <param name="Threshold" value="INFO"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Messagen -->
@@ -32,7 +32,7 @@
<appender name="FILE"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="target/server-jar-test.log"/>
- <param name="Threshold" value="WARN"/>
+ <param name="Threshold" value="DEBUG"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
@@ -48,6 +48,14 @@
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+
+ <category name="org.hibernate">
+ <priority value="WARN"/>
+ </category>
+
<!-- Hibernate logs WARNINGS frequent from this class, in test envs. -->
<category name="org.hibernate.hql.ast.QueryTranslatorImpl">
<priority value="ERROR"/>
diff --git a/modules/test-utils/src/main/java/org/rhq/test/PortScout.java
b/modules/test-utils/src/main/java/org/rhq/test/PortScout.java
new file mode 100644
index 0000000..0c54cbd
--- /dev/null
+++ b/modules/test-utils/src/main/java/org/rhq/test/PortScout.java
@@ -0,0 +1,69 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.test;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.SocketAddress;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Tries to find a series of free ports.
+ *
+ * The ports remain open until the {@link #close()} method is called.
+ *
+ * @author Lukas Krejci
+ */
+public class PortScout implements Closeable {
+
+ private Set<ServerSocket> activeSockets = new HashSet<ServerSocket>();
+
+ public int getNextFreePort() throws IOException {
+ ServerSocket s = new ServerSocket(0);
+ activeSockets.add(s);
+ return s.getLocalPort();
+ }
+
+ @Override
+ public void close() throws IOException {
+ String message = null;
+ for(ServerSocket s : activeSockets) {
+ SocketAddress addr = s.getLocalSocketAddress();
+ try {
+ s.close();
+ } catch (IOException e) {
+ if (message == null) {
+ message = "The following test sockets failed to close while
looking for free ports:\n";
+ }
+
+ message += addr.toString() + ": " + e.getMessage() +
",\n";
+ }
+ }
+
+ if (message != null) {
+ message = message.substring(0, message.length() - 2);
+
+ throw new IOException(message);
+ }
+ }
+}
commit e6be4a4ef2a098c61e0629593a64d08a9e575a10
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Nov 26 11:46:54 2012 +0100
BZ 880136 - disable the Connections available trait by default.
(cherry-picked from c38b8eb, BZ 859417)
diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
index 92370cb..2b14f5b 100644
--- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
@@ -9,9 +9,9 @@
<!ENTITY datasourceAndConnectionFactoryMetrics '
<!-- Traits -->
- <metric property="custom.connectionAvailable"
displayType="summary" displayName="Connection Available?"
- dataType="trait" category="availability"
defaultInterval="900000"
- description="could a connection to the underlying data provider be
obtained?"/>
+ <metric property="custom.connectionAvailable"
displayType="detail" displayName="Connection Available?"
+ dataType="trait" category="availability"
defaultInterval="900000" defaultOn="false"
+ description="could a connection to the underlying data provider be
obtained? Please see the documentation before enabling this metric"/>
'>
<!ENTITY datasourceAndConnectionFactoryOperations '
commit 5c4217effa33ffd892f55005b09f7ed7201125f6
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Mon Nov 26 10:55:04 2012 +0100
[BZ-879583] Monitoring : process availability gives wrong status (SIGAR)
ProcessInfo instance needs to be refreshed on every avail check
diff --git
a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
index 8281f70..9e9b95f 100644
---
a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
+++
b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
@@ -67,6 +67,7 @@ public class ProcessComponent implements ResourceComponent,
MeasurementFacet {
private String piql;
private boolean fullProcessTree;
+ @Override
public void start(ResourceContext resourceContext) throws
InvalidPluginConfigurationException, Exception {
this.resourceContext = resourceContext;
@@ -89,9 +90,11 @@ public class ProcessComponent implements ResourceComponent,
MeasurementFacet {
}
}
+ @Override
public void stop() {
}
+ @Override
public AvailabilityType getAvailability() {
try {
return getProcess().isRunning() ? AvailabilityType.UP :
AvailabilityType.DOWN;
@@ -106,6 +109,10 @@ public class ProcessComponent implements ResourceComponent,
MeasurementFacet {
private ProcessInfo getProcess() throws Exception {
if (this.process == null || !this.process.isRunning()) {
this.process = getProcessForConfiguration();
+ } else {
+ // Refresh previously existing ProcessInfo as it may hold stale data.
+ // SIGAR objects do not get updated when, for example, a process goes down.
+ process.refresh();
}
return this.process;
}
@@ -168,6 +175,7 @@ public class ProcessComponent implements ResourceComponent,
MeasurementFacet {
return processInfo;
}
+ @Override
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest>
metrics) {
if (this.process != null) {
this.process.refresh();
commit 844f016ee8b2608496d063c94f38461e997bcabe
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 23 17:18:35 2012 +0100
[BZ 879655] - Properly deactivate the resource instead of just calling the
component's stop() method when forcing reactivation of a started component.
This will ensure the PC can't enter an inconsistent state in the case the
stop() method fails.
diff --git
a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
index b3f7fa9..473b0d0 100644
---
a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
+++
b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
@@ -1614,7 +1614,10 @@ public class InventoryManager extends AgentService implements
ContainerService,
if (forceReinitialization) {
switch (state) {
case STARTED:
- component.stop();
+ if (log.isDebugEnabled()) {
+ log.debug("Forcing re-initialization of an already started
resource: " + resource);
+ }
+ deactivateResource(resource);
break;
case STARTING:
log.warn("Could not force initialization of component for
resource [" + resource.getId()
@@ -2037,7 +2040,7 @@ public class InventoryManager extends AgentService implements
ContainerService,
log.debug("Successfully deactivated resource with id ["
+ resource.getId() + "].");
}
} catch (Throwable t) {
- log.warn("Plugin Error: Failed to stop component for [" +
resource + "].");
+ log.warn("Plugin Error: Failed to stop component for [" +
resource + "].", t);
}
container.setResourceComponentState(ResourceComponentState.STOPPED);
commit 16f04c50bd9cffaed77c73338d5f31ffb0f9c451
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 23 17:12:43 2012 +0100
Improvements in Apache integration tests:
* improved logging
* randomization of used ports
* *WithoutSNMP tests don't use SNMP even after upgrade (makes the behavior more
understandable)
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 8f8cdb6..aebea53 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -102,9 +102,6 @@ public class UpgradeTestBase extends PluginContainerTest {
boolean testFailed = false;
try {
- LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
- + testId);
-
String[] configFiles =
Arrays.copyOf(testConfiguration.apacheConfigurationFiles,
testConfiguration.apacheConfigurationFiles.length + 1);
configFiles[testConfiguration.apacheConfigurationFiles.length] =
"/snmpd.conf";
@@ -114,7 +111,11 @@ public class UpgradeTestBase extends PluginContainerTest {
.withServerRoot(testConfiguration.serverRoot).withExePath(testConfiguration.binPath);
testConfiguration.beforeTestSetup(setup);
-
+
+ LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
+ + testId);
+ LOG.debug("Deployment configuration: " +
setup.getDeploymentConfig());
+
setup.setup();
testConfiguration.beforePluginContainerStart(setup);
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
index bc80898..02be42c 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
@@ -19,7 +19,6 @@
package org.rhq.plugins.apache.util;
-import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
@@ -33,7 +32,6 @@ import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
@@ -198,10 +196,40 @@ public class ApacheDeploymentUtil {
tokenReplacements.put(LISTEN4, address4 == null ? "" :
address4.toString(false, false));
}
}
+
+ @Override
+ public String toString() {
+ StringBuilder bld = new StringBuilder("VHost[");
+ if (address1 != null) {
+ bld.append(address1.toString()).append(", ");
+ }
+ if (address2 != null) {
+ bld.append(address2.toString()).append(", ");
+ }
+ if (address3 != null) {
+ bld.append(address3.toString()).append(", ");
+ }
+ if (address4 != null) {
+ bld.append(address4.toString()).append(", ");
+ }
+
+ String serverName = getServerName();
+ if (serverName != null) {
+ bld.append("serverName=").append(serverName).append(",
");
+ }
+
+ if (additionalDirectives != null) {
+ bld.append("with additional directives, ");
+ }
+
+ bld.replace(bld.length() - 2, bld.length(), "]");
+
+ return bld.toString();
+ }
}
public String serverRoot = null;
- public String documentRoot = "hdocs";
+ public String documentRoot = "htdocs";
public String snmpHost = "localhost";
public int snmpPort = 1610;
public final VHost mainServer = new VHost();
@@ -242,48 +270,69 @@ public class ApacheDeploymentUtil {
default: throw new IllegalArgumentException();
}
}
+
+ @Override
+ public String toString() {
+ return new
StringBuilder("DeploymentConfig[").append("mainServer=").append(mainServer).append(",
vhost1=")
+ .append(vhost1).append(",
vhost2=").append(vhost2).append(", vhost3=").append(vhost3)
+ .append(", vhost4=").append(vhost4).append(",
serverRoot=").append(serverRoot)
+ .append(", documentRoot=").append(documentRoot).append(",
snmpHost=").append(snmpHost)
+ .append(",
snmpPort=").append(snmpPort).append("]").toString();
+ }
}
public static void addDefaultVariables(Map<String, String> variables, String
prefix) {
InetAddress localhost = determineLocalhost();
- checkOrAddDefault(variables, "localhost", localhost.getHostName());
- checkOrAddDefault(variables, "localhost.ip",
localhost.getHostAddress());
- checkOrAddDefault(variables, "unresolvable.host",
"unreachable.host.com");
- checkOrAddDefault(variables, "port1", "11675");
- checkOrAddDefault(variables, "port2", "11676");
- checkOrAddDefault(variables, "port3", "11677");
- checkOrAddDefault(variables, "port4", "11678");
-
- if (prefix != null && !prefix.trim().isEmpty()) {
- prefix += ".";
- } else {
- prefix = "";
+ PortScout portScout = new PortScout();
+ try {
+ checkOrAddDefault(variables, "localhost",
localhost.getHostName());
+ checkOrAddDefault(variables, "localhost.ip",
localhost.getHostAddress());
+ checkOrAddDefault(variables, "unresolvable.host",
"unreachable.host.com");
+
+ checkOrAddDefault(variables, "port1",
getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port2",
getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port3",
getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port4",
getRandomFreePort(portScout));
+
+ if (prefix != null && !prefix.trim().isEmpty()) {
+ prefix += ".";
+ } else {
+ prefix = "";
+ }
+
+ checkOrAddDefault(variables, prefix + "snmp.port",
getRandomFreePort(portScout));
+
+ checkOrAddDefault(variables, prefix + "listen1",
"${port1}");
+ checkOrAddDefault(variables, prefix + "listen2",
"${port2}");
+ checkOrAddDefault(variables, prefix + "listen3",
"${port3}");
+ checkOrAddDefault(variables, prefix + "listen4",
"${port4}");
+
+ checkOrAddDefault(variables, prefix + "vhost1.servername",
"${localhost}:${port1}");
+ checkOrAddDefault(variables, prefix + "vhost1.urls", "${"
+ prefix + "vhost1.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost1.servername.directive", "ServerName ${" + prefix
+ + "vhost1.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost2.servername",
"${localhost}:${port2}");
+ checkOrAddDefault(variables, prefix + "vhost2.urls", "${"
+ prefix + "vhost2.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost2.servername.directive", "ServerName ${" + prefix
+ + "vhost2.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost3.servername",
"${localhost}:${port3}");
+ checkOrAddDefault(variables, prefix + "vhost3.urls", "${"
+ prefix + "vhost3.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost3.servername.directive", "ServerName ${" + prefix
+ + "vhost3.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost4.servername",
"${localhost}:${port4}");
+ checkOrAddDefault(variables, prefix + "vhost4.urls", "${"
+ prefix + "vhost4.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost4.servername.directive", "ServerName ${" + prefix
+ + "vhost4.servername}");
+ } finally {
+ try {
+ portScout.close();
+ } catch (IOException e) {
+ throw new IllegalStateException(e);
+ }
}
-
- checkOrAddDefault(variables, prefix + "listen1",
"${port1}");
- checkOrAddDefault(variables, prefix + "listen2",
"${port2}");
- checkOrAddDefault(variables, prefix + "listen3",
"${port3}");
- checkOrAddDefault(variables, prefix + "listen4",
"${port4}");
-
- checkOrAddDefault(variables, prefix + "vhost1.servername",
"${localhost}:${port1}");
- checkOrAddDefault(variables, prefix + "vhost1.urls", "${" +
prefix + "vhost1.servername}");
- checkOrAddDefault(variables, prefix + "vhost1.servername.directive",
"ServerName ${" + prefix
- + "vhost1.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost2.servername",
"${localhost}:${port2}");
- checkOrAddDefault(variables, prefix + "vhost2.urls", "${" +
prefix + "vhost2.servername}");
- checkOrAddDefault(variables, prefix + "vhost2.servername.directive",
"ServerName ${" + prefix
- + "vhost2.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost3.servername",
"${localhost}:${port3}");
- checkOrAddDefault(variables, prefix + "vhost3.urls", "${" +
prefix + "vhost3.servername}");
- checkOrAddDefault(variables, prefix + "vhost3.servername.directive",
"ServerName ${" + prefix
- + "vhost3.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost4.servername",
"${localhost}:${port4}");
- checkOrAddDefault(variables, prefix + "vhost4.urls", "${" +
prefix + "vhost4.servername}");
- checkOrAddDefault(variables, prefix + "vhost4.servername.directive",
"ServerName ${" + prefix
- + "vhost4.servername}");
}
private static void checkOrAddDefault(Map<String, String> map, String key,
String value) {
@@ -433,4 +482,12 @@ public class ApacheDeploymentUtil {
}
}
};
+
+ private static String getRandomFreePort(PortScout scout) throws IllegalStateException
{
+ try {
+ return Integer.toString(scout.getNextFreePort());
+ } catch (IOException e) {
+ throw new IllegalStateException("Failed to find a free port.", e);
+ }
+ }
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
new file mode 100644
index 0000000..3a33f09
--- /dev/null
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
@@ -0,0 +1,69 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.plugins.apache.util;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.SocketAddress;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Tries to find a series of free ports.
+ *
+ * The ports remain open until the {@link #close()} method is called.
+ *
+ * @author Lukas Krejci
+ */
+public class PortScout implements Closeable {
+
+ private Set<ServerSocket> activeSockets = new HashSet<ServerSocket>();
+
+ public int getNextFreePort() throws IOException {
+ ServerSocket s = new ServerSocket(0);
+ activeSockets.add(s);
+ return s.getLocalPort();
+ }
+
+ @Override
+ public void close() throws IOException {
+ String message = null;
+ for(ServerSocket s : activeSockets) {
+ SocketAddress addr = s.getLocalSocketAddress();
+ try {
+ s.close();
+ } catch (IOException e) {
+ if (message == null) {
+ message = "The following test sockets failed to close while
looking for free ports:\n";
+ }
+
+ message += addr.toString() + ": " + e.getMessage() +
",\n";
+ }
+ }
+
+ if (message != null) {
+ message = message.substring(0, message.length() - 2);
+
+ throw new IOException(message);
+ }
+ }
+}
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
index 008588f..70151b7 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
@@ -19,7 +19,7 @@
<param name="MaxBackupIndex" value="1000" />
<param name="MaxFileSize" value="50MB" />
<layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
+ <param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} [%t] (%F:%M:%L) -%m%n"/>
</layout>
</appender>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
index 32f6477..10530b5 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
index d0dd8ac..cbb9d66 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue><!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
index d0dd8ac..1f97d99 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
index 32f6477..10530b5 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
index c3906be..987a9a0 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
index 716773a..8557de3 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
index 716773a..8557de3 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
index c3906be..987a9a0 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index a07438d..2a2b839 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -292,7 +292,8 @@ public class ApacheServerComponent implements AugeasRHQComponent,
ResourceCompon
availPingTime = System.currentTimeMillis() - t1;
} else {
if (log.isDebugEnabled()) {
- log.debug("Trying to ping the server for availability through
SNMP.");
+ log.debug("Trying to ping the server for availability through
SNMP "
+ +
getSNMPAddressString(resourceContext.getPluginConfiguration()));
}
available = getSNMPSession().ping();
availPingTime = -1;
@@ -633,6 +634,14 @@ public class ApacheServerComponent implements AugeasRHQComponent,
ResourceCompon
return snmpSession;
}
+ private static String getSNMPAddressString(Configuration pluginConfig) {
+ String host =
pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_HOST).getStringValue();
+ String portString =
pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_PORT).getStringValue();
+ String community =
pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_COMMUNITY).getStringValue();
+
+ return host + ":" + portString + "/" + community;
+ }
+
/**
* Return the absolute path of this Apache server's server root (e.g.
"C:\Program Files\Apache Group\Apache2").
*
commit 8b0919aceedac820bcbd2beb9408b1795cc32c8d
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 17:00:07 2012 +0100
stuff to help debug the apache integration test failures.
diff --git a/modules/enterprise/scripting/javascript/pom.xml
b/modules/enterprise/scripting/javascript/pom.xml
index ab35acb..ee5e4ba 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -27,6 +27,10 @@
</dependency>
</dependencies>
+ <properties>
+ <failIfNoTests>true</failIfNoTests>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -61,7 +65,7 @@
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
<!-- This is important, because some of the tests try to exit
the JVM. -->
- <failIfNoTests>true</failIfNoTests>
+ <failIfNoTests>${failIfNoTests}</failIfNoTests>
</configuration>
</plugin>
</plugins>
diff --git a/modules/enterprise/scripting/python/pom.xml
b/modules/enterprise/scripting/python/pom.xml
index e4b3cfb..fc64086 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -10,6 +10,10 @@
<name>RHQ Python support</name>
<description>Provides RHQ scripting in Python using Jython</description>
+ <properties>
+ <failIfNoTests>true</failIfNoTests>
+ </properties>
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -60,7 +64,7 @@
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
<!-- This is important, because some of the tests try to exit
the JVM. -->
- <failIfNoTests>true</failIfNoTests>
+ <failIfNoTests>${failIfNoTests}</failIfNoTests>
</configuration>
</plugin>
</plugins>
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index 8ccef7f..a07438d 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -283,18 +283,31 @@ public class ApacheServerComponent implements AugeasRHQComponent,
ResourceCompon
boolean available;
try {
if (this.url != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Trying to ping the server for availability: " +
this.url);
+ }
long t1 = System.currentTimeMillis();
int timeout = PluginUtility.getAvailabilityFacetTimeout();
available = WWWUtils.isAvailable(this.url, timeout);
availPingTime = System.currentTimeMillis() - t1;
} else {
+ if (log.isDebugEnabled()) {
+ log.debug("Trying to ping the server for availability through
SNMP.");
+ }
available = getSNMPSession().ping();
availPingTime = -1;
}
} catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.debug("Exception while checking availability.", e);
+ }
available = false;
}
+ if (log.isDebugEnabled()) {
+ log.debug("Availability determined: " + (available ?
AvailabilityType.UP : AvailabilityType.DOWN));
+ }
+
return (available) ? AvailabilityType.UP : AvailabilityType.DOWN;
}
commit bed7fb96f03e50db87a8b9699846e6f51b24584a
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Fri Nov 23 11:37:42 2012 +0100
Fix Eclipse classpath file
GWT -> 2.5.0
joda-time was missing
diff --git a/.classpath b/.classpath
index e452825..e2d8841 100644
--- a/.classpath
+++ b/.classpath
@@ -269,8 +269,8 @@
<classpathentry exported="true" kind="var"
path="M2_REPO/jboss/web/jbossweb/2.0.1.GA/jbossweb-2.0.1.GA.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/libvirt/libvirt/0.4.1/libvirt-0.4.1.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/fedorahosted/cobbler/cobbler4j/0.1/cobbler4j-0.1.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/smartgwt/smartgwt/3.0/smartgwt-3.0.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/googlecode/gflot/gflot/2.4.2/gflot-2.4.2.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/jcraft/jsch/0.1.29/jsch-0.1.29.jar"/>
@@ -316,5 +316,6 @@
<classpathentry exported="true" kind="var"
path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1-20120531.064118-1.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/byteman/byteman/1.2.1/byteman-1.2.1.jar"/>
<classpathentry kind="var"
path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1.1-20121031.024335-6.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/joda-time/joda-time/2.1/joda-time-2.1.jar"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
commit a819562f809b7ca59c4f9b39c779df7abdb84704
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 13:14:48 2012 +0100
Add more excludes for the mem pools
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
index 0bf2796..374748d 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
@@ -58,7 +58,9 @@ public class GenericJBossAS7PluginTest extends
AbstractJBossAS7PluginTest {
// are not exposed, it is normal that the server returns 'undefined' for
the value
// Note that those
excludedMetricNamesByType.put(new ResourceType("Memory Pool
Resource",PLUGIN_NAME, ResourceCategory.SERVICE,null),
- new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage"});
+ new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage",
+
"collection-usage-threshold-exceeded","collection-usage:committed","collection-usage:init",
+
"collection-usage:max","collection-usage:used","usage-threshold-count","usage-threshold-exceeded"});
assertAllNumericMetricsAndTraitsHaveNonNullValues(excludedMetricNamesByType);
}
commit 22e30a3ff434e1193ef84ce6fa0ae7eb0dc2cbec
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 11:41:25 2012 +0100
Make message more clear in case of failure.
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
index bb1eca2..130f7f3 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
@@ -100,7 +100,7 @@ public abstract class AbstractIntegrationTest {
assert node != null : "No result from upload - node was null";
assert node.has("outcome") : "No outcome from upload";
String outcome = node.get("outcome").getTextValue();
- assert outcome.equals("success") : "Upload was no success" +
outcome;
+ assert outcome.equals("success") : "Upload was no success, but:
[" + outcome + "]";
JsonNode resultNode = node.get("result");
return resultNode.get("BYTES_VALUE").getTextValue();
commit c9d13f6b1cc8745c11e047be4c55786a8b9ca16c
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 09:10:41 2012 +0100
Add some excluded metrics, as they may indeed return null.
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
index 2b7ec7a..0bf2796 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.testng.annotations.Test;
+import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.plugin.testutil.AbstractAgentPluginTest;
import org.rhq.modules.plugins.jbossas7.itest.domain.ManagedServerTest;
@@ -53,6 +54,11 @@ public class GenericJBossAS7PluginTest extends
AbstractJBossAS7PluginTest {
// It's normal for the "startTime" trait to be null for a Managed
Server that is down/disabled.
// It's normal for the "multicastAddress" trait to be null for a
Managed Server that is not configured for JGroups HA.
excludedMetricNamesByType.put(ManagedServerTest.RESOURCE_TYPE, new String[]
{"startTime", "multicastAddress"});
+ // Some memory pools do not expose those statistics (by default), so in case
they
+ // are not exposed, it is normal that the server returns 'undefined' for
the value
+ // Note that those
+ excludedMetricNamesByType.put(new ResourceType("Memory Pool
Resource",PLUGIN_NAME, ResourceCategory.SERVICE,null),
+ new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage"});
assertAllNumericMetricsAndTraitsHaveNonNullValues(excludedMetricNamesByType);
}
commit 94e78de367b5472188fcad8425b0e057f8d602af
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Nov 20 10:31:32 2012 +0100
Print the DB-url and user that is used to run the tests to make debugging easier.
diff --git
a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index 82af5e0..b57f661 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -24,6 +24,7 @@ package org.rhq.core.domain.test;
import java.io.File;
import java.net.URL;
+import java.sql.DatabaseMetaData;
import java.util.Date;
import java.util.Hashtable;
@@ -79,6 +80,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
deployer.start();
System.err.println("...... deployer started....");
+ printDbVersion();
} catch (Throwable t) {
// Catch RuntimeExceptions and Errors and dump their stack trace, because
Surefire will completely swallow them
// and throw a cryptic NPE (see
http://jira.codehaus.org/browse/SUREFIRE-157)!
@@ -100,6 +102,13 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
return lookupEntityManager();
}
+ private static void printDbVersion() throws Exception {
+ EntityManager em = lookupEntityManager();
+ DatabaseMetaData md = ((org.hibernate.ejb.EntityManagerImpl)
em).getSession().connection().getMetaData();
+ System.err.println(">>> Database url for testing is [" +
md.getURL() + "] with user [" + md.getUserName() + "] <<<");
+
+ }
+
public boolean isPostgres(EntityManager em) throws Exception {
return ((org.hibernate.ejb.EntityManagerImpl)
em).getSession().connection().getMetaData()
.getDatabaseProductName().toLowerCase().indexOf("postgres") >
-1;
commit fa0629bd6c85ddea66f782772a9e4b11fbdc78a0
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 18:41:14 2012 +0100
Recovering from the loss of ant as a transitive dep of cobertura in tests.
diff --git
a/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
b/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
index 01a38e6..b651629 100644
---
a/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
+++
b/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
@@ -22,13 +22,10 @@ package org.rhq.enterprise.clienapi;
import static org.testng.Assert.assertEquals;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.Reader;
import java.net.URI;
-import java.net.URL;
-import org.apache.tools.ant.filters.StringInputStream;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
diff --git a/modules/enterprise/server/jar/pom.xml
b/modules/enterprise/server/jar/pom.xml
index 06a6e69..18ff9d4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -571,6 +571,12 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
commit 5d2732fd7f4b2c11e81962dc95584a3f0801fab1
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 17:26:11 2012 +0100
Removing last remnants of cobertura from the poms.
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index e036910..20f1f76 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -16,16 +16,6 @@
<name>RHQ Helpers</name>
<description>parent POM for all RHQ helpers</description>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-
<modules>
<module>rtfilter</module>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 2525960..a04cf92 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -40,12 +40,6 @@
<artifactId>commons-beanutils</artifactId>
<version>1.8.2</version>
</dependency>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils-dbunit</artifactId>
@@ -70,6 +64,11 @@
using the version that we use else where.
jsanda 10/20/2010
+
+ Cobertura is not used anymore so no ASM clashes should
+ be present. We still maintain this exclusion though
+ to force the usage of "our" version of Hibernate.
+ lkrejci 2012-11-21
-->
<exclusion>
<groupId>org.hibernate</groupId>
diff --git a/pom.xml b/pom.xml
index cefbe69..f8b3811 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,6 @@
<twitter4j.version>2.2.4</twitter4j.version>
<commons-codec.version>1.4</commons-codec.version>
<testng.version>6.5.2</testng.version>
- <cobertura.version>1.9.4.1</cobertura.version>
<augeas.version>0.9.0</augeas.version>
<augeas.classifier>el5</augeas.classifier>
<augeas.zip.version>0.9.0</augeas.zip.version>
@@ -567,13 +566,6 @@
</dependency>
<!-- end of workaround -->
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
-
</dependencies>
commit e2b304be7cc59a0e4cf331b1f8506bf8d2f9eb56
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 16:07:30 2012 +0100
Fixing the incorrect assertions in the ApplicationServerComponentTest in AS5
integration tests.
diff --git
a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
index 6d60b85..effc856 100644
---
a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
+++
b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
@@ -23,9 +23,9 @@
package org.rhq.plugins.jbossas5.itest;
import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
import java.io.File;
import java.util.Arrays;
@@ -220,8 +220,8 @@ public class ApplicationServerComponentTest extends
AbstractJBossAS5PluginTest {
operationResult = invokeOperation(getServerResource(), SHUTDOWN_OPERATION_NAME,
null);
avail = getAvailability(getServerResource());
assertEquals(avail, AvailabilityType.DOWN);
- assertNull(operationResult.getErrorMessage());
- assertEquals(operationResult.getSimpleResult(), "The server has been shut
down.");
+ assertNotNull(operationResult.getErrorMessage());
+ assertNull(operationResult.getSimpleResult());
// Before restarting it, add some stuff to the 'startScriptEnv' and
'startScriptArgs' props so we can verify
// they are used correctly by the Start op.