[jboss-svn-commits] JBL Code SVN: r23463 - in labs/jbossesb/workspace/skeagh: examples/helloworld and 2 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Oct 15 13:01:59 EDT 2008
Author: tfennelly
Date: 2008-10-15 13:01:59 -0400 (Wed, 15 Oct 2008)
New Revision: 23463
Modified:
labs/jbossesb/workspace/skeagh/container/osgi/osgi.bnd
labs/jbossesb/workspace/skeagh/examples/helloworld/osgi.bnd
labs/jbossesb/workspace/skeagh/examples/helloworld/pom.xml
labs/jbossesb/workspace/skeagh/examples/helloworld/run.bat
labs/jbossesb/workspace/skeagh/routing/jms/osgi.bnd
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java
Log:
mode OSGi stuff... some tests are failing... will fix that now, but the basic OSGi bundling seems to work now
Modified: labs/jbossesb/workspace/skeagh/container/osgi/osgi.bnd
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/osgi.bnd 2008-10-15 14:40:15 UTC (rev 23462)
+++ labs/jbossesb/workspace/skeagh/container/osgi/osgi.bnd 2008-10-15 17:01:59 UTC (rev 23463)
@@ -6,6 +6,8 @@
# to "invoke".
#
#-----------------------------------------------------------------
+
+# TODO: Create an API bundle and export these packages from there.
Export-Package: org.jboss.esb.test,\
org.jboss.esb.annotations, \
org.jboss.esb.context, \
@@ -14,6 +16,8 @@
org.jboss.esb.service, \
org.jboss.esb.message
Private-Package: org.jboss.esb.osgi
+
+# TODO: Replace global import with explicit package imports?
Import-Package: *;resolution:=optional
Bundle-Activator: org.jboss.esb.osgi.EsbServiceDeploymentActivator
Modified: labs/jbossesb/workspace/skeagh/examples/helloworld/osgi.bnd
===================================================================
--- labs/jbossesb/workspace/skeagh/examples/helloworld/osgi.bnd 2008-10-15 14:40:15 UTC (rev 23462)
+++ labs/jbossesb/workspace/skeagh/examples/helloworld/osgi.bnd 2008-10-15 17:01:59 UTC (rev 23463)
@@ -2,12 +2,23 @@
# Use this file to add customized Bnd instructions for the bundle
#-----------------------------------------------------------------
+#
+# Embedding and exporting ActiveMQ explicitly here. This needs to be
+# fixed. The ActiveMQ classes should be made available through a bundle of
+# it's own and then imported here. I had issues with running the ActiveMQ v5.0.2
+# bundle, so embedding it here for now.
+#
+
Export-Package: org.jboss.esb.examples.helloworld, org.apache.activemq.jndi
+
+# TODO: Version imports
+# TODO: Replace global import with explicit package imports?
Import-Package: org.jboss.esb.jms, *;resolution:=optional
-# Dependencies that need to be included into the bundle.
-# This can be any no-osgi bundle that your bundle needs.
-Embed-Dependency: log4j, activemq-core
+Embed-Dependency: activemq-core, \
+ backport-util-concurrent, \
+ log4j, commons-logging, \
+ geronimo-j2ee-management_1.1_spec
Embed-Transitive: true
Modified: labs/jbossesb/workspace/skeagh/examples/helloworld/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/examples/helloworld/pom.xml 2008-10-15 14:40:15 UTC (rev 23462)
+++ labs/jbossesb/workspace/skeagh/examples/helloworld/pom.xml 2008-10-15 17:01:59 UTC (rev 23463)
@@ -76,8 +76,8 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
- <version>1.0</version>
+ <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
+ <version>1.0-M1</version>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
Modified: labs/jbossesb/workspace/skeagh/examples/helloworld/run.bat
===================================================================
--- labs/jbossesb/workspace/skeagh/examples/helloworld/run.bat 2008-10-15 14:40:15 UTC (rev 23462)
+++ labs/jbossesb/workspace/skeagh/examples/helloworld/run.bat 2008-10-15 17:01:59 UTC (rev 23463)
@@ -1,11 +1,15 @@
@echo off
+setlocal
+
set JAVA_OPTS=
if "%1" == "-debug" (
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%
)
-set FELIX_JAR="%HOME%\.m2\repository\org\apache\felix\org.apache.felix.main\1.2.1\org.apache.felix.main-1.2.1.jar"
+set FELIX_JAR="%USERPROFILE%\.m2\repository\org\apache\felix\org.apache.felix.main\1.2.1\org.apache.felix.main-1.2.1.jar"
"%JAVA_HOME%\bin\java" %JAVA_OPTS% -jar %FELIX_JAR%
+
+endlocal
\ No newline at end of file
Modified: labs/jbossesb/workspace/skeagh/routing/jms/osgi.bnd
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/osgi.bnd 2008-10-15 14:40:15 UTC (rev 23462)
+++ labs/jbossesb/workspace/skeagh/routing/jms/osgi.bnd 2008-10-15 17:01:59 UTC (rev 23463)
@@ -3,6 +3,8 @@
#-----------------------------------------------------------------
Export-Package: org.jboss.esb.jms
+
+# TODO: Replace global import with explicit package imports?
Import-Package: *;resolution:=optional
Embed-Dependency: jbossesb-commons, log4j
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java 2008-10-15 14:40:15 UTC (rev 23462)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java 2008-10-15 17:01:59 UTC (rev 23463)
@@ -120,20 +120,6 @@
jmsSession = new JMSSession(jmsProperties);
jmsSession.setClassLoader(resourceLocator.getClassLoader());
- /*
- * Need to set the context classloader due to the current OSGi packaging.
- * The jbossesb-routing-jms bundle needs to set the context classloader as
- * it uses classes that in turn use jndi to lookup a destination. JNDI uses
- * the thread context classloader which is not set by an osgi bundle. We are
- * currently setting the context classloader to this bundles classloader, hence
- * we are saying that the bundle that this class is packaged in will provide the
- * classes needed to by the installed JMS provider. This does not mean that the
- * JMS providers classes must physically exist in this bundle. It can also mean
- * that this bundle imports the packages needed. All we are saying is that the
- * bundles classloader will have access to the classes. /Daniel 2008-10-13
- */
- jmsSession.setClassLoader(getClass().getClassLoader());
-
// set the context class loader to this classes classloader.
jmsDestination = jmsSession.lookupDestination(destination);
More information about the jboss-svn-commits
mailing list