[Messaging, JMS & JBossMQ] - Re: JMS Queue Error on Petstore demo run under Cluster mode
by mp123
Hello,
Actually, I have run the two servers named node1 and node2 with Apache modjk load balancer by keeping node1 as the main node and it only bound the queue/order and queue/mail.
I have did the below modification in both the server machines node1 as well as node2.
I have copied the jndi.properties file from <JBOSS_HOME>/server/node1/conf/ path and copied to <JBOSS_HOME>/server/node1/lib/ path and with the following modifications.
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
|
| java.naming.provider.url=<node1-ipaddress>:1100, <node2-ip address.:1100
And, the lookup of queue is taken place in the application as follows.
In the file,
"<PETSTORE_HOME>/xpetstore-ejb/java/xpetstore/util/JMSUtil.java"
ic = new InitialContext( );
| Queue queue = ( Queue ) ic.lookup( queueName );
| QueueConnectionFactory factory = ( QueueConnectionFactory ) ic.lookup( JNDINames.QUEUE_C
| ONNECTION_FACTORY );
| cnn = factory.createQueueConnection( );
While running the application,
all the transaction is done by node1 till clicking the Submit button for sending mail to user. When I hit the submit button, the transaction goes to the second node node2 in which the queue is not bound.
1. While two server is running, the sending of mail is not done and error comes as shown my post above.
2. If any of one node is down, its automatically bound the queue and running the petstore application successfully.
My problem is, the application should run successfully when all the nodes in the cluster are active.
Please help me.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985321#3985321
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985321
19Â years, 7Â months
[Clustering/JBoss] - Re: Is it possible to execute Petstore demo in cluster mode?
by mp123
Hello,
Thanks for your reply.
Actually, I have run the two servers named node1 and node2 with Apache modjk load balancer by keeping node1 as the main node and it only bound the queue/order and queue/mail.
I have did the below modification in both the server machines node1 as well as node2.
I have copied the jndi.properties file from <JBOSS_HOME>/server/node1/conf/ path and copied to <JBOSS_HOME>/server/node1/lib/ path and with the following modifications.
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=<node1-ipaddress>:1100, <node2-ip address.:1100
|
And, the lookup of queue is taken place in the application as follows.
In the file,
"<PETSTORE_HOME>/xpetstore-ejb/java/xpetstore/util/JMSUtil.java"
| ic = new InitialContext( );
|
| Queue queue = ( Queue ) ic.lookup( queueName );
|
| QueueConnectionFactory factory = ( QueueConnectionFactory ) ic.lookup( JNDINames.QUEUE_CONNECTION_FACTORY );
| cnn = factory.createQueueConnection( );
|
While running the application, all the transaction is done by node1 till clicking the Submit button for sending mail to user. When I hit the submit button, the transaction goes to the second node node2 in which the queue is not bound.
1. While two server is running, the sending of mail is not done and error comes as shown my post above.
2. If any of one node is down, its automatically bound the queue and running the petstore application successfully.
My problem is, the application should run successfully when all the nodes in the cluster are active.
Please help me.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985320#3985320
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985320
19Â years, 7Â months
[Installation, Configuration & Deployment] - Building errors with script language
by jzhuqlfeixia
Hello, bodies
I'm newly in ANT, as I can't find ANT's offical forums, I put my question here, hoping somebody could help me.
I use "script language" in my "compas-ant.xml", below is my codes:
| <target name="jar_iterator">
| <script language="beanshell">
| <![CDATA[
| String path=project.getProperty( "compasEARlocation" ) + "/jars";
| File jarsDir = new File( path );
| String[] jars = jarsDir.list(); //all the subdirs containing the expanded jars
| for( i=0; i < jars.length; i++ ){
| print( "Loading " + jars + "..." );
|
| // launches the manifest task that updates the original manifest with the compas-proxies.jar class-path entry
| manifestUpdater=project.createTask( "manifest" );
| manifestUpdater.setFile( new File(path + "/" + jars + "/META-INF/MANIFEST.MF") );
| org.apache.tools.ant.taskdefs.ManifestTask.Mode mode = new org.apache.tools.ant.taskdefs.ManifestTask.Mode();
| mode.setValue( "update" );
| manifestUpdater.setMode( mode );
| org.apache.tools.ant.taskdefs.Manifest.Attribute clsPath = new org.apache.tools.ant.taskdefs.Manifest.Attribute( "Class-Path", "compas-proxies.jar jboss_adaptor.jar" );//weblogic_adaptor.jar websphere_adaptor.jar
| manifestUpdater.addConfiguredAttribute( clsPath );
| manifestUpdater.execute();
|
| // creates the jar task and adds it to the repackJARs target
| jarer = project.createTask( "jar" );
| repackJARs.addTask( jarer );
| jarer.setDestFile( new File(path + "/" + jars + ".jar") );
| jarer.setBasedir( new File(path + "/" + jars) );
| jarer.setManifest( new File(path + "/" + jars + "/META-INF/MANIFEST.MF") );
| }
| ]]>
| </script>
|
| </target>
|
Here is error-messages after build:
| [java] BUILD FAILED
| [java] file:E:/compas/scripts/compas-ant.xml:163: Could not create task or
| type of type: script.
|
| [java] Ant could not find the task or a class this task relies upon.
|
| [java] This is common and has a number of causes; the usual
| [java] solutions are to read the manual pages then download and
| [java] install needed JAR files, or fix the build file:
| [java] - You have misspelt 'script'.
| [java] Fix: check your spelling.
| [java] - The task needs an external JAR file to execute
| [java] and this is not found at the right place in the classpath.
| [java] Fix: check the documentation for dependencies.
| [java] Fix: declare the task.
| [java] - The task is an Ant optional task and optional.jar is absent
| [java] Fix: look for optional.jar in ANT_HOME/lib, download if needed
| [java] - The task was not built into optional.jar as dependent
| [java] libraries were not found at build time.
| [java] Fix: look in the JAR to verify, then rebuild with the needed
| [java] libraries, or download a release version from apache.org
| [java] - The build file was written for a later version of Ant
| [java] Fix: upgrade to at least the latest release version of Ant
| [java] - The task is not an Ant core or optional task
| [java] and needs to be declared using <taskdef>.
|
| [java] Remember that for JAR files to be visible to Ant tasks implemented
| [java] in ANT_HOME/lib, the files must be in the same directory or on the
| [java] classpath
|
BTW, I have used ANT 1.5.4 / 1.6.5 / 1.7.0Beta3 instead, but none of them seemed sucess.
And "optional.jar", mentioned above, already add to my lib path.
Waiting for some suggestion, thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985316#3985316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985316
19Â years, 7Â months
[Tomcat, HTTPD, Servlets & JSP] - virtual-host not mapping to multiple services in server.xml
by jek5522
I have set up a second service in server.xml
| <Service name="jboss2.web"
| className="org.jboss.web.tomcat.tc5.StandardService">
|
| <!-- A HTTP/1.1 Connector on port 8080 -->
| <Connector port="8085" address="${jboss.bind.address}"
| maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| enableLookups="false" redirectPort="8443" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true"/>
|
|
| <Engine name="jboss2.web" defaultHost="localhost2">
|
| <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
| certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
| allRolesMode="authOnly"
| />
|
|
| <Host name="localhost2"
| autoDeploy="false" deployOnStartup="false" deployXML="false"
| configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
| >
|
| <Valve className="org.jboss.web.tomcat.tc5.jca.CachedConnectionValve"
| cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
| transactionManagerObjectName="jboss:service=TransactionManager" />
|
| </Host>
|
| <Host name="tester"
| autoDeploy="false" deployOnStartup="false" deployXML="false"
| configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
| >
|
| <Alias>cms.d6einc.com</Alias>
|
| </Host>
|
| </Engine>
|
| </Service>
In my jboss-web.xml I have added the following
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-web>
| <security-domain>java:/jaas/CompanyManagementSystemSecurity</security-domain>
| <context-root>/</context-root>
| <virtual-host>cms.d6einc.com</virtual-host>
| </jboss-web>
|
and when the application is deployed i get an error saying "failed to map vhost cms.d6einc.com". I have tried using both cms.d6einc.com and tester as the virtual-host element but end up with the same error both way.
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985312#3985312
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985312
19Â years, 7Â months