[JNDI/Naming/Network] - Error setting up weblogic mdb to monitor jboss queue
by whafrog
Hi we're in the process of migrating all our apps off weblogic 7 to jboss 4.2. We can only do this one app at a time. A couple of the apps send messages to each other through weblogic's jms. We've finished migrating our first app to jboss (App1) and would like to send messages to the old weblogic app (App2). Now it gets sticky :-)
Weblogic 7 does not have client jars, so to do any "pushing" from App1(jboss) to App2(weblogic) would require App1 to have the entire weblogic.jar file. Bad idea. So I was hoping to "pull" from App1 by using an MDB in App2 set up to monitor the App1 queue. We're already doing this successfully with another weblogic 7 app (monitoring a jboss 3.03 queue), so the setup should be the same.
However, my MDB doesn't deploy due to a "no security manager" error. A wrinkle: weblogic 7 runs under jdk1.3.1, so I used the client jars from jboss 3.03, even though the app I'm connecting to is running under jboss 4.2.0GA. The JNDI properties (factories, etc) haven't changed. Should I be using the jboss 4.2 client jars even though my app runs on jdk1.3.1?
I have also tried XAConnectionFactory, but with no success.
The Error:
2007-11-11 21:03:24,171 | logging.Logger:debug | Extracting SpyConnectionFactory from reference
| javax.naming.NamingException: Invalid reference. Error: org.jboss.mq.il.uil2.UILServerIL (no security manager: RMI class loader disabled)
| at org.jboss.mq.referenceable.ObjectRefAddr.extractObjectRefFrom(ObjectRefAddr.java:82)
| at org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.getObjectInstance(SpyConnectionFactoryObjectFactory.java:48)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:299)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:549)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
| at javax.naming.InitialContext.lookup(InitialContext.java:345)
| at weblogic.ejb20.internal.JMSConnectionPoller.getConnection(JMSConnectionPoller.java:516)
| at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:1643)
| at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:991)
| at weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling(JMSConnectionPoller.java:759)
| at weblogic.ejb20.deployer.MessageDrivenBeanPoolInfoImpl.start(MessageDrivenBeanPoolInfoImpl.java:213)
| at weblogic.ejb20.deployer.EJBDeployer.deployMessageDrivenBeans(EJBDeployer.java:1524)
| at weblogic.ejb20.deployer.EJBDeployer.start(EJBDeployer.java:1381)
| at weblogic.ejb20.deployer.EJBModule.start(EJBModule.java:404)
| at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:983)
| at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:969)
| at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:619)
| at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:376)
| at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:235)
| at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61)
| at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:806)
| at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:295)
| at weblogic.Server.main(Server.java:32)
ejb-jar.xml:
<message-driven>
| <ejb-name>AMessageBean</ejb-name>
| <ejb-class>com.something.somewhere.ambd.AMessageBean</ejb-class>
| <transaction-type>Container</transaction-type>
| <message-selector>Destination='App2'</message-selector>
| <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
| <message-driven-destination>
| <destination-type>javax.jms.Queue</destination-type>
| </message-driven-destination>
| </message-driven>
weblogic-ejb-jar.xml:
<weblogic-enterprise-bean>
| <ejb-name>AMessageBean</ejb-name>
| <message-driven-descriptor>
| <pool>
| <max-beans-in-free-pool>10</max-beans-in-free-pool>
| <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
| </pool>
| <destination-jndi-name>queue/AQueue</destination-jndi-name>
| <initial-context-factory>org.jnp.interfaces.NamingContextFactory</initial-context-factory>
| <provider-url>jnp://localhost:1099</provider-url>
| <connection-factory-jndi-name>ConnectionFactory</connection-factory-jndi-name>
| </message-driven-descriptor>
| <jndi-name>jms/AMessageBean</jndi-name>
| </weblogic-enterprise-bean>
Any help, or alternate communication suggestions, would be appreciated. Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103536#4103536
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103536
18 years, 8 months
[JBoss Seam] - Re: Seam remoting or DWR
by Fangzx
After two days hard work, I decided to modify remote.js in
jboss-seam-remoting.jar to support synchronous call.
old code:
asyncReq.open("POST", Seam.Remoting.resourcePath + path, true);
new code :
asyncReq.open("POST", Seam.Remoting.resourcePath + path, Seam.Remoting.async);
I create an utility method to remoting call that can used by DWR and
JBoss Seam Remoting:
function rmtCall(method, callback, params, isAsync) {
| var s = method.split('.');
| var callParams = [];
| if (params) {
| for (i = 0;i < params.length; i++) {
| callParams.push(params);
| }
| }
| if (Seam.serverSide) {
| callParams.push(callback);
| var obj = Seam.Component.newInstance(s[0]);
| Seam.Remoting.async = isAsync;
| eval('obj.' + s[1] + '.apply(obj, callParams)');
| } else {
| callParams.push( {
| callback : callback,
| async : isAsync
| });
| eval(method + '.apply(' + s[0] + ', callParams)');
| }
| }
|
Any comments are appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103530#4103530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103530
18 years, 8 months
[JBoss jBPM] - Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
by neville.sequeira
It seems the root cause is the following query defined in the file org/jbpm/db/hibernate.queries.hbm.xml (to be found in jbpm-jpdl.jar) :
| <query name="Simulation.calculateAverageTimeForDecisions">
| <![CDATA[
| select
| nl.node.id,
| nl.node.name,
| count(nl.leave),
| avg(nl.duration),
| min(nl.duration),
| max(nl.duration),
| stddev(nl.duration)
| from org.jbpm.graph.log.NodeLog nl
| where nl.node.processDefinition = :processDefinition
| and nl.node.class = org.jbpm.graph.node.Decision
| and time(nl.enter) > time(:fromTime) and time(nl.enter) < time(:tillTime)
| group by nl.node
| ]]>
| </query>
|
jBPM Job Executor is attemting to execute this query every so often. However, on going through hibernate soure code for org.hibernate.dialect.HSQLDialect, the problem seems to be that this dialect (HSQLDialect) does not invoke registerFunction for the function named 'stddev' :-(
In fact, the function 'stddev' is being registered for only DB2, Oracle8i, Oracle9 and PostgresSQL dialects.
The issue did not exist in earlier versions of jBPM source code.
This is a weird state of affairs - jBPM code is sort of ahead of the Hibernate code it depends on?
Any ideas for how to address this will be highly appreciated?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103528#4103528
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103528
18 years, 8 months