[JBoss Messaging] - Running JBM as a Window service
by tqtuan
Hi,
My messaging configuration stops working when I run it as a Window service. FYI, below is my wrapper config file for the messaing configuration:
wrapper.java.command=C:\hk\3rdParty\Sun\jdk1.5.0_11\bin\java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=C:/hk/3rdParty/JBoss/jboss-4.2.2.GA/bin/wrapper.jar
wrapper.java.classpath.2=C:/hk/3rdParty/Sun/jdk1.5.0_11/lib/tools.jar
wrapper.java.classpath.3=./run.jar
wrapper.java.classpath.4=C:/hk/ITF/Distribution/server/3rdparty/ojdbc14.jar
wrapper.java.library.path.1=C:/hk/3rdParty/JBoss/jboss-4.2.2.GA/lib
# these are the JAVA_OPTS
wrapper.java.additional.1=-server
# enviroment variables - define the ones that match your desired environment
wrapper.java.additional.2=-Denviromnment.variable=value
# memory parameters - define the ones that match your desired environment
wrapper.java.additional.3=-Xms64m
wrapper.java.additional.4=-Xmx96m
# If you need serialization suppport
wrapper.java.additional.5=-Dsession.serialization.jboss=true
wrapper.app.parameter.1=org.jboss.Main
# Parameters to be passed to the application (Jboss)
# Define server name (configuration) - If you need a config that is different than the "default" or need to run multiple configs
wrapper.app.parameter.2=-c RRSMessaging
# Define listening IP - If you have more than one IP or want to indicate to listen on a specific IP
wrapper.app.parameter.3=-b mke06390
# wrapper log location
wrapper.logfile=C:/hk/3rdParty/JBoss/jboss-4.2.2.GA/server/RRSMessaging/log/wrapper.log
# You must not change below parameters without first uninstall the service
# service name
wrapper.ntservice.name=14599RRSMessaging
# service display name
wrapper.ntservice.displayname=RRS Messaging Engine
If I started my messaging configuration using the command line "jboss-4.2.2.GA\bin\run.bat -c <CONFIG_NAME>", everything works fine. My client programs are able to publish and subscribe to the topics no problem. The jndi properties used by the clients are as follow:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.provider.url=jnp://localhost:1099
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
However, when if I started my configuration as a Window service, my clients programs stop working. I think the problem has to do with the clients are not able to find the Naming Service at jnp://localhost:1099.
Please help. Thank you in advance.
The exception I am getting is
[i]avax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.irista.messaging.framework.JndiHelper.lookup(JndiHelper.java:114)
at com.irista.messaging.adapter.topic.JmsTopicManager.initialize(JmsTopicManager.java:119)
at com.irista.messaging.adapter.topic.JmsTopicManager.(JmsTopicManager.java:98)
at com.irista.rrs.messaging.adapter.JmsTopicPublisher.initialize(JmsTopicPublisher.java:86)
at com.irista.rrs.messaging.adapter.JmsTopicPublisher.(JmsTopicPublisher.java:70)
at com.irista.rrs.messaging.framework.RRSPublisherShell.startObject(RRSPublisherShell.java:262)
at com.irista.foundation.systemmanagement.objectshell.FoundationJavaShellImpl.start(FoundationJavaShellImpl.java:561)
at com.irista.foundation.systemmanagement.objectshell.FoundationJavaShellImpl.initialize(FoundationJavaShellImpl.java:290)
at com.irista.foundation.systemmanagement.objectshell.FoundationJavaShellImpl.(FoundationJavaShellImpl.java:110)
at com.irista.foundation.systemmanagement.objectshell.FoundationJavaShellImpl.main(FoundationJavaShellImpl.java:390)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 13 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 14 more
Caused by: java.net.ConnectException: Connection refused: connect
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:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.(Socket.java:366)
at java.net.Socket.(Socket.java:266)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 14 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124912#4124912
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124912
18 years, 2 months
Re: Problem creating a portlet instance in JBoss Portal 2.6
by samk@twinix.com
See Thread at: http://www.techienuggets.com/Detail?tx=14625 Posted on behalf of a User
This is what I got.. just sharing
Example of *-objects.xml
--------------------------
<deployments>
<deployment>
<if-exists>overwrite</if-exists>
<parent-ref>default</parent-ref>
<page>
<page-name>MyPage</page-name>
<window>
<window-name>MyPortletWindow</window-name>
<instance-ref>MyPortletInstance</instance-ref> <--------------- instance reference
<region>center</region>
<height>0</height>
</window>
</page>
</deployment>
</deployments>
Example of portlet-instances.xml
-----------------------------------------
<?xml version="1.0" standalone="yes"?>
<deployments>
<deployment>
<if-exists>overwrite</if-exists>
<instance>
<instance-id>MyPortletInstance</instance-id> <---------- instance reference
<portlet-ref>MyPortlet</portlet-ref>
</instance>
</deployment>
</deployments>
Example of portlet.xml
-----------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd /opt/SUNWps/dtd/portlet.xsd"
version="1.0">
<portlet>
<display-name>MyPortlet</display-name>
<portlet-name>MyPortlet</portlet-name>
<portlet-class>com.portlets.MyPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<portlet-info>
<title>Title of my portlet</title>
</portlet-info>
</portlet>
</portlet-app>
In Response To:
Same problem please help!
18 years, 2 months
Re: Problem creating a portlet instance in JBoss Portal 2.6
by samk@twinix.com
See Thread at: http://www.techienuggets.com/Detail?tx=14625 Posted on behalf of a User
Same problem please help!
In Response To:
Hi,
I try to migrate from JBoss Portal 2.2.1 to 2.6 and have a problem creating a portlet instance. I reference to the portlet in portelt-instances.xml : <portlet-ref> portletapp.myportlet</portlet-ref>. The portlet is a part of a web application called portletapp. The deployment descriptor portlet-instances.xml is a part of other web application called deplapp. I get following error message while deploying the web application containing the deployment descriptor: ?Failed to create instance myportletInstance of portlet deplapp.portletapp.myportlet because portlet deplapp.portletapp.myportlet is not available?. How can I create an instance of a portlet that deployed in the other web application?
Thanks for help!
18 years, 2 months