[jboss-cvs] JBoss Messaging SVN: r3338 - in branches/Branch_MC_Integration_New/src: etc/server/standalone/config/local and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 16 09:40:00 EST 2007
Author: ataylor
Date: 2007-11-16 09:39:59 -0500 (Fri, 16 Nov 2007)
New Revision: 3338
Modified:
branches/Branch_MC_Integration_New/src/etc/embedded.mf
branches/Branch_MC_Integration_New/src/etc/server/standalone/config/local/jndi.properties
branches/Branch_MC_Integration_New/src/etc/server/standalone/config/remote/remote.xml
branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/jndi/InVMContext.java
branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JBMBootstrapServer.java
branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JndiBinder.java
branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/NonSerializableFactory.java
branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/ServiceLocator.java
Log:
initial microcontainer integration, added new invmcontext fixes
Modified: branches/Branch_MC_Integration_New/src/etc/embedded.mf
===================================================================
--- branches/Branch_MC_Integration_New/src/etc/embedded.mf 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/etc/embedded.mf 2007-11-16 14:39:59 UTC (rev 3338)
@@ -9,4 +9,4 @@
Implementation-Vendor: @MODULE_VENDOR@
Implementation-Vendor-Id: @MODULE_URL@
Main-Class: org.jboss.jms.server.microcontainer.JBMBootstrapServer
-Class-Path: jboss-kernel.jar jboss-javaee.jar jboss-common.jar jboss-xml-binding.jar jboss-common-core.jar jboss-container.jar jboss-dependency.jar concurrent.jar jnp-client.jar jnpserver.jar xercesImpl.jar jgroups.jar jboss-remoting.jar commons-logging.jar hsqldb.jar jbossjta.jar jbossjta-integration.jar jbossts-common.jar jbosssx-client.jar jboss-system.jar jboss-jmx.jar jboss-aop-jdk50.jar trove.jar javassist.jar log4j.jar jboss-common-logging-spi.jar jboss-xml-binding.jar jboss-transaction-spi.jar jboss-security-spi.jar jboss-jaspi-api.jar
\ No newline at end of file
+Class-Path: jboss-kernel.jar jboss-javaee.jar jboss-common.jar jboss-xml-binding.jar jboss-common-core.jar jboss-container.jar jboss-dependency.jar concurrent.jar jnp-client.jar jnpserver.jar xercesImpl.jar jgroups.jar jboss-remoting.jar commons-logging.jar hsqldb.jar jbossjta.jar jbossjta-integration.jar jbossts-common.jar jbosssx-client.jar jboss-system.jar jboss-jmx.jar jboss-aop-jdk50.jar trove.jar javassist.jar log4j.jar jboss-common-logging-spi.jar jboss-xml-binding.jar jboss-transaction-spi.jar jboss-security-spi.jar jboss-jaspi-api.jar jnpserver.jar
\ No newline at end of file
Modified: branches/Branch_MC_Integration_New/src/etc/server/standalone/config/local/jndi.properties
===================================================================
--- branches/Branch_MC_Integration_New/src/etc/server/standalone/config/local/jndi.properties 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/etc/server/standalone/config/local/jndi.properties 2007-11-16 14:39:59 UTC (rev 3338)
@@ -1,3 +1,2 @@
java.naming.factory.initial=org.jboss.jms.server.jndi.InVMInitialContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Modified: branches/Branch_MC_Integration_New/src/etc/server/standalone/config/remote/remote.xml
===================================================================
--- branches/Branch_MC_Integration_New/src/etc/server/standalone/config/remote/remote.xml 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/etc/server/standalone/config/remote/remote.xml 2007-11-16 14:39:59 UTC (rev 3338)
@@ -37,7 +37,6 @@
<inject bean="Jaas"/>
</property>
<property name="bindTo">java:/jaas/messaging</property>
- <property name="serializable">false</property>
</bean>
<bean name="Jaas" class="org.jboss.jms.server.microcontainer.AuthenticationManager"/>
@@ -55,7 +54,6 @@
<inject bean="jboss.jca:name=DefaultDS,service=DataSourceBinding"/>
</property>
<property name="bindTo">java:/DefaultDS</property>
- <property name="serializable">false</property>
</bean>
<bean name="TMBinding" class="org.jboss.jms.server.microcontainer.JndiBinder">
@@ -66,7 +64,6 @@
<inject bean="jboss:service=TransactionManager"/>
</property>
<property name="bindTo">java:/TransactionManager</property>
- <property name="serializable">false</property>
</bean>
<bean name="jboss:service=TransactionManager"
Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/jndi/InVMContext.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/jndi/InVMContext.java 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/jndi/InVMContext.java 2007-11-16 14:39:59 UTC (rev 3338)
@@ -21,9 +21,9 @@
*/
package org.jboss.jms.server.jndi;
+import org.jboss.jms.server.microcontainer.NonSerializableFactory;
import org.jboss.logging.Logger;
import org.jboss.messaging.util.NotYetImplementedException;
-import org.jboss.util.naming.NonSerializableFactory;
import javax.naming.*;
import java.io.Serializable;
@@ -265,7 +265,7 @@
public String getNameInNamespace() throws NamingException
{
- throw new NotYetImplementedException();
+ return "";
}
// Public --------------------------------------------------------
Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JBMBootstrapServer.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JBMBootstrapServer.java 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JBMBootstrapServer.java 2007-11-16 14:39:59 UTC (rev 3338)
@@ -30,10 +30,10 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.net.URL;
-import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
/**
* @author <a href="ataylor at redhat.com">Andy Taylor</a>
@@ -47,7 +47,7 @@
/**
* The deployments
*/
- protected List deployments = new ArrayList();
+ protected List deployments = new CopyOnWriteArrayList();
/**
* The arguments
*/
Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JndiBinder.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JndiBinder.java 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/JndiBinder.java 2007-11-16 14:39:59 UTC (rev 3338)
@@ -25,6 +25,7 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import java.io.Serializable;
import java.util.Hashtable;
/**
@@ -33,10 +34,14 @@
public class JndiBinder
{
+ private String bindTo;
+ private Object target;
+ private Hashtable properties;
public JndiBinder()
{
}
+
public void setBindTo(String bindTo)
{
this.bindTo = bindTo;
@@ -62,12 +67,20 @@
try
{
- Util.rebind(ctx, bindTo, target);
+ if(target.getClass().isAssignableFrom(Serializable.class))
+ {
+ Util.rebind(ctx, bindTo, target);
+ }
+ else
+ {
+ NonSerializableFactory.bind(ctx, bindTo, target);
+ }
}
catch (NamingException e)
{
+ e.printStackTrace();
NamingException namingException = new NamingException((new StringBuilder()).append("Could not bind JndiBinder service into JNDI under jndiName:").append(ctx.getNameInNamespace()).append("/").append(bindTo).toString());
namingException.setRootCause(e);
throw namingException;
@@ -83,9 +96,6 @@
}
- private String bindTo;
- private Object target;
- private Hashtable properties;
private static InitialContext getInitialContext(Hashtable props)
throws NamingException
Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/NonSerializableFactory.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/NonSerializableFactory.java 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/NonSerializableFactory.java 2007-11-16 14:39:59 UTC (rev 3338)
@@ -86,6 +86,14 @@
parentCtx.bind(atom, memoryRef);
}
+ public static Object lookup(String name) throws NamingException
+ {
+ if(wrapperMap.get(name) == null)
+ {
+ throw new NamingException(name + " not found");
+ }
+ return wrapperMap.get(name);
+ }
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable env)
throws Exception
Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/ServiceLocator.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/ServiceLocator.java 2007-11-16 12:22:58 UTC (rev 3337)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/microcontainer/ServiceLocator.java 2007-11-16 14:39:59 UTC (rev 3338)
@@ -75,7 +75,7 @@
//try in the initial context, if its not there use the one that has been injected
try
{
- dataSource = (DataSource)ic.lookup("java:DefaultDS");
+ dataSource = (DataSource)ic.lookup("java:/DefaultDS");
}
catch (Exception e)
{
More information about the jboss-cvs-commits
mailing list