Commit f28195d3 authored by afreyssin's avatar afreyssin

Use local JNDI server on bridge side, the central (pivot) JNDI server is only...

Use local JNDI server on bridge side, the central (pivot) JNDI server is only use by bridge destinations to retrieve "pivot" destinations.
parent f7b61567
......@@ -21,6 +21,8 @@
<property name="Transaction" value="fr.dyade.aaa.ext.NGTransaction"/>
<server id="1" name="S1" hostname="localhost">
<service class="fr.dyade.aaa.jndi2.server.JndiServer" args="16401"/>
<service class="org.objectweb.joram.mom.proxies.ConnectionManager" args="root root" />
<service class="org.objectweb.joram.mom.proxies.tcp.TcpProxyService" args="16011" />
......
......@@ -87,7 +87,8 @@
dir="${run.dir}/server${sid}">
<classpath path="${felix.class.path}"/>
<!-- jvmarg line="-Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote.port=9191 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -DTransaction.SyncOnWrite=false"/ -->
<jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote -DTransaction.SyncOnWrite=false"/>
<!-- jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote -DTransaction.SyncOnWrite=false"/ -->
<jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote -DTransaction.SyncOnWrite=false"/>
<!-- jvmarg line="-server -Xmx1500m -Xincgc -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/ -->
<!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
</java>
......@@ -251,7 +252,7 @@
<!-- EF Bridge server -->
<target name="efbridge_server" depends="simple_init"
description="--> Runs EF bridge server">
description="--> Starts the EF bridge server">
<antcall target="server">
<param name="sid" value="1"/>
<param name="a3.conf" value="${conf.dir}/efbridge_a3servers.xml"/>
......
......@@ -22,6 +22,8 @@
*/
package efbridge;
import java.util.Properties;
import javax.jms.ConnectionFactory;
import org.objectweb.joram.client.jms.Queue;
......@@ -53,7 +55,12 @@ public class Admin {
System.out.println("joram acquisition queue = " + acqq);
// bind foreign destination and connectionFactory
javax.naming.Context jndiCtx = new javax.naming.InitialContext();
Properties jndiProps = new Properties();
jndiProps.setProperty("java.naming.factory.initial", "fr.dyade.aaa.jndi2.client.NamingContextFactory");
jndiProps.setProperty("java.naming.factory.host", "localhost");
jndiProps.setProperty("java.naming.factory.port", "16401");
javax.naming.Context jndiCtx = new javax.naming.InitialContext(jndiProps);
jndiCtx.rebind("distq", distq);
jndiCtx.rebind("acqq", acqq);
jndiCtx.rebind("bridgeCF", bridgeCF);
......
......@@ -22,6 +22,8 @@
*/
package efbridge;
import java.util.Properties;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
......@@ -35,7 +37,12 @@ public class Consumer {
public static void main(String[] args) throws Exception {
javax.naming.Context jndiCtx = new javax.naming.InitialContext();
Properties jndiProps = new Properties();
jndiProps.setProperty("java.naming.factory.initial", "fr.dyade.aaa.jndi2.client.NamingContextFactory");
jndiProps.setProperty("java.naming.factory.host", "localhost");
jndiProps.setProperty("java.naming.factory.port", "16401");
javax.naming.Context jndiCtx = new javax.naming.InitialContext(jndiProps);
Destination bridgeDest = (Destination) jndiCtx.lookup("acqq");
ConnectionFactory bridgeCF = (ConnectionFactory) jndiCtx.lookup("bridgeCF");
jndiCtx.close();
......
......@@ -22,6 +22,8 @@
*/
package efbridge;
import java.util.Properties;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
......@@ -36,7 +38,12 @@ public class Producer {
public static void main(String[] args) throws Exception {
javax.naming.Context jndiCtx = new javax.naming.InitialContext();
Properties jndiProps = new Properties();
jndiProps.setProperty("java.naming.factory.initial", "fr.dyade.aaa.jndi2.client.NamingContextFactory");
jndiProps.setProperty("java.naming.factory.host", "localhost");
jndiProps.setProperty("java.naming.factory.port", "16401");
javax.naming.Context jndiCtx = new javax.naming.InitialContext(jndiProps);
Destination bridgeDest = (Destination) jndiCtx.lookup("distq");
ConnectionFactory bridgeCF = (ConnectionFactory) jndiCtx.lookup("bridgeCF");
jndiCtx.close();
......
......@@ -28,7 +28,7 @@
<property name="java.naming.factory.initial"
value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
<property name="java.naming.factory.host" value="localhost"/>
<property name="java.naming.factory.port" value="16400"/>
<property name="java.naming.factory.port" value="16401"/>
</InitialContext>
<TcpConnectionFactory name="bridgeCF" host="localhost" port="16011">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment