[Remoting] - Can't connect to JBoss Messaging behind firewall
by ienvyou
Hello, Team
I'm testing on below configuration under firewall. The problem is that secondaryBindPort doesn't work on our configuration.
JBoss Messaging : JBoss Messaging 1.4.0.SP3-CP04
JBoss Remoting : JBoss remoting 2.2.2 SP-10
Because I use the "ports-02" in sample-bindings.xml under docs/examples/binding-manager/, I appended these to the configuration file :
<attribute name="secondaryBindPort">14000</attribute>
| <attribute name="secondaryConnectPort">14001</attribute>
When I run client to JBoss Messaging over firewall, I've got this message :
Exception in thread "main" java.lang.RuntimeException: Failed to download and/or install client side AOP stack
| at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:199)
| at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
| at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
| at com.jboss.jms.client.SimpleSender.send(SimpleSender.java:34)
| at com.jboss.jms.client.SimpleSender.main(SimpleSender.java:97)
| Caused by: org.jboss.jms.exception.MessagingNetworkFailureException
| at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:240)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:237)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
| at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
| at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
| ... 4 more
| Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://mydomain.com:4657//?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&stopLeaseOnFailure=true&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&validatorPingPeriod=10000&validatorPingTimeout=4000]
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:579)
| at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:422)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.remoting.Client.invoke(Client.java:536)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
| ... 9 more
| Caused by: java.net.NoRouteToHostException: No route to host
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:520)
I think this doesn't work with secondaryBindPort and secondaryConnectPort attributes.
bisocket://mydomain.com:4657//?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&stopLeaseOnFailure=true&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&validatorPingPeriod=10000&validatorPingTimeout=4000
How do I solve this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203152#4203152
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203152
17 years, 3 months
[JBoss Portal] - Re: How to create a new Portlet Instance using API
by yanivc24
Thanks for the answer
I did as you suggested and created the following code in order to create a new instance:
| PersistentInstanceDefinition instanceToCopy=(PersistentInstanceDefinition) instanceContainerContext.getInstanceDefinition(intanceName);
|
| Date current = new Date();
| String newInstanceId = instanceToCopy.getId() + "_" + current.getTime();
|
| PortletContext portletContext = PortletContext.createPortletContext("PortletName");
|
| Portlet portletDefinition = portletInvoker.getPortlet(portletContext);
| PersistentInstanceDefinition newInstance=(PersistentInstanceDefinition)
| instanceContainer.createDefinition(newInstanceId,portletDefinition.getContext().getId());
|
| Set constraints = Collections.singleton(new RoleSecurityBinding("view", SecurityConstants.UNCHECKED_ROLE_NAME));
| securityService.setSecurityBindings(newInstanceId,constraints);
|
| PropertyChange[] properties = duplicateInstanceProperties(instanceToCopy.getProperties());
| newInstance.setProperties(properties);
|
|
As you can see from the code, I'm actually trying to create a new instance that will be identical to an existing instance(based on the same portlet and have the same property values). Unfortunately this code works without giving an exception or returning any null values. but the instance created is never shown in the instance list of the portal administrative panel and therefore cannot be used.
Basically I followed the code in the CreateInstanceAction class file.
Any suggestions?
Many Thanks,
Yaniv
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203134#4203134
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203134
17 years, 3 months