[Installation, Configuration & Deployment] - Jboss with Jrockit JVM as windows service
by gregamb
Hi,
I'm trying to set up the Java Service Wrapper to start the Jboss as a windows service.
I tried to use the instructions on the official web page, but they don't work for me. When ever I want to test it (start from Console) I?m getting exceptions ? so also the windows service is not working.
My environment is like this:
OS: Windows Server 2003
App Server: jboss-4.0.5.GA
JAVA: jrockit-R27.2.0-jdk1.5.0_10
I'm running 3 instances of JBoss. If I start them from run.bat they are working normally ? also if I use SUN java and Java service it's working as it should.
My wrapper.conf file looks like this:
wrapper.java.command=%JAVA_HOME%/bin/java
wrapper.java.additional.1=-Dprogram.name=run.bat
wrapper.java.additional.2=-Xms256m
wrapper.java.additional.3=-Xmx768m
wrapper.java.additional.4=-Djava.endorsed.dirs=c:/%JBOSS_HOME%/lib/endorsed
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=%JAVA_HOME%/lib/tools.jar
wrapper.java.classpath.3=./run.jar
wrapper.java.library.path.1=../lib
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.app.parameter.1=org.jboss.Main
wrapper.app.parameter.2=-c instance3
wrapper.ntservice.name=JBoss-instance3
wrapper.ntservice.displayname=JBoss Server-instance3
Does any one have any idea how should I set up the config file so that it will start instance that I want on JBoss.
Or do you know how else i could create Windows service because javaservice is not working with jRockit java.
Thanks,
Grega
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053078#4053078
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053078
18Â years, 10Â months
[JBoss jBPM] - Re: Urgent, Please help
by vpnuser
I had made some changes in the build.xml files, please find them below.
The bpel-build.xml is given below
| <?xml version="1.0"?>
| <project name="bpel">
|
| <!-- =============== -->
| <!-- === IMPORTS === -->
| <!-- =============== -->
|
| <import file="ws-build-hello.xml" />
|
| <!-- ================== -->
| <!-- === PROPERTIES === -->
| <!-- ================== -->
|
| <property name="bpel.dir" value="${project.dir}/src/main/bpel" />
|
|
|
| <!-- ================== -->
| <!-- === CLASSPATHS === -->
| <!-- ================== -->
|
| <path id="jbpm.bpel.path">
| <pathelement location="${common.config.dir}" />
| <pathelement location="${jbpm.bpel.config.dir}" />
| <pathelement location="${lib.jbpm.bpel.jar}" />
| <pathelement location="${lib.jbpm.jpdl.jar}" />
| <pathelement location="${lib1.dir}" />
| <pathelement location="${lib2.dir}" />
| <pathelement location="${lib3.dir}" />
| <pathelement location="${lib4.dir}" />
|
|
| <pathelement location="${lib.commons.collections.local}" />
| <pathelement location="${lib.commons.lang.local}" />
| <pathelement location="${lib.commons.logging.local}" />
| <pathelement location="${lib.dom4j.local}" />
| <pathelement location="${lib.jaxen.local}" />
| <pathelement location="${lib.log4j.local}" />
| <pathelement location="${lib.wsdl4j.local}" />
| </path>
|
| <!-- ======================= -->
| <!-- === ANT DEFINITIONS === -->
| <!-- ======================= -->
|
|
| <taskdef name="deployprocess"
| classname="org.jbpm.bpel.ant.DeployProcessTask"
| classpathref="jbpm.bpel.path" />
| <taskdef name="servicegen"
| classname="org.jbpm.bpel.ant.ServiceGeneratorTask"
| classpathref="jbpm.bpel.path" />
|
| <!-- ================================== -->
| <!-- === PROCESS DEFINITION DEPLOYMENT === -->
| <!-- ================================== -->
|
| <target name="pack-definition">
| <mkdir dir="${output.dir}" />
| <zip destfile="${output.dir}/${module.name}-process.zip">
| <fileset dir="${bpel.dir}" />
| </zip>
| </target>
|
| <target name="deploy-definition"
| depends="pack-definition"
| description="deploy the process definition to jbpm">
| <deployprocess processfile="D:/Va/jbpm-bpel-1.1.Beta3/examples/hello/target/${module.name}-process.zip" />
| <!-- Store the process definition in the jBPM database -->
| <storeprocess processfile="D:/Va/jboss-4.0.4.GA/server/default/deploy/${module.name}-process.zip" />
| </target>
|
| <!-- =============================== -->
| <!-- === WSDL SERVICE GENERATION === -->
| <!-- =============================== -->
|
| <target name="generate-service"
| depends="pack-definition"
| description="generate wsdl binding and service elements">
| <!-- generate binding and service elements -->
| <servicegen processfile="${output.dir}/${module.name}-process.zip"
| outputdir="${output.web.dir}/wsdl"
| bindingfile="${module.name}-binding-.wsdl"
| servicefile="${module.name}-service.wsdl" />
| <!-- copy xml schema documents -->
| <copy todir="${output.web.dir}/wsdl">
| <fileset dir="${bpel.dir}" includes="**/*.xsd" />
| </copy>
| </target>
|
| <!-- ============================== -->
| <!-- === APPLICATION DEPLOYMENT === -->
| <!-- ============================== -->
|
| <target name="redeploy"
| depends="deploy-definition, generate-service, generate-artifacts, deploy"
| description="deploy definition, regenerate artifacts and deploy web module" />
|
| </project>
|
and the ws-build.xml is given below,
| <?xml version="1.0"?>
| <project name="template">
|
| <!-- ================== -->
| <!-- === PROPERTIES === -->
| <!-- ================== -->
|
| <!-- project directories -->
| <property name="common.dir" value="${ant.file.template}/.." />
| <property name="basedir" value="D:/Va/jbpm-bpel-1.1.Beta3" />
| <property name="project.dir" value="."/>
| <property name="module.name" value="hello"/>
|
| <property name="lib1.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-bpel.jar" />
| <property name="lib2.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-identity.jar" />
| <property name="lib3.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-jmx.jar" />
| <property name="lib4.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-jpdl.jar" />
| <property name="common.config.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/examples/common/src/main/config" />
| <property name="jbpm.bpel.config.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/config"/>
| <property name="lib.wsdl4j.local" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/ibm-wsdl4j/1.5.2/lib"/>
|
|
| <property name="java.dir" value="${project.dir}/src/main/java" />
| <property name="resources.dir" value="${project.dir}/src/main/resources" />
| <property name="web.dir" value="${resources.dir}/web" />
| <property name="client.dir" value="${resources.dir}/client" />
|
| <property name="test.java.dir" value="${project.dir}/src/test/java" />
|
| <property name="output.dir" value="${project.dir}/target" />
| <property name="output.java.dir" value="${output.dir}/java" />
| <property name="output.classes.dir" value="${output.dir}/classes" />
| <property name="output.web.dir" value="${output.dir}/resources/web" />
|
| <property name="output.test.dir" value="${output.dir}/test" />
| <property name="output.test.classes.dir" value="${output.test.dir}/classes" />
| <property name="output.test.reports.dir" value="${output.test.dir}/reports" />
|
| <property name="common.java.dir" value="${common.dir}/src/main/java" />
| <property name="common.config.dir" value="${common.dir}/src/main/config" />
| <property name="common.classes.dir" value="${common.dir}/target/classes" />
|
| <!-- project specific properties -->
| <property name="module.name" value="${ant.project.name}" />
| <property name="jbpm.root" value="${common.dir}/../../.." />
|
| <!-- property files -->
| <property file="${user.home}/jbpm/build.properties" />
| <property file="../../config/build.properties" />
|
| <!-- jboss server configuration -->
| <property name="jboss.server" value="default" />
| <property name="jboss.server.dir"
| value="${jboss.home}/server/${jboss.server}" />
| <property name="jboss.server.deploy.dir"
| value="${jboss.home}/server/${jboss.server}/deploy" />
|
| <!-- ================== -->
| <!-- === CLASSPATHS === -->
| <!-- ================== -->
|
| <path id="jboss.path">
| <pathelement location="${common.config.dir}" />
| <fileset dir="${jboss.home}/client" includes="*.jar" />
| </path>
|
| <path id="wstools.path">
| <path refid="jboss.path" />
| <pathelement location="${web.dir}" />
| <pathelement location="${output.web.dir}" />
| </path>
|
| <path id="wscompile.path">
| <fileset dir="${jwsdp.home}/jaxrpc/lib" includes="*.jar" />
| <pathelement location="${java.home}/../lib/tools.jar" />
| <pathelement location="${resources.dir}" />
| </path>
|
| <path id="test.path">
| <path refid="jboss.path" />
| <pathelement location="${common.classes.dir}" />
| <pathelement location="${output.classes.dir}" />
| </path>
|
| <!-- =============== -->
| <!-- === CLEANUP === -->
| <!-- =============== -->
|
| <target name="clean" description="remove generated files">
| <delete dir="${output.dir}" failonerror="no" />
| </target>
|
| <!-- ==================================== -->
| <!-- === MAPPING ARTIFACTS GENERATION === -->
| <!-- ==================================== -->
|
| <target name="detect-wsgenerator">
| <available property="wstools.available"
| classname="org.jboss.ws.tools.ant.wstools"
| classpathref="jboss.path" />
| <condition property="wsgenerator.available">
| <or>
| <isset property="wstools.available" />
| <isset property="jwsdp.home" />
| </or>
| </condition>
| <fail message="no artifacts generator available"
| unless="wsgenerator.available" />
| </target>
|
| <target name="setup-wstools" if="wstools.available" unless="jwsdp.home">
| <taskdef name="wstools"
| classname="org.jboss.ws.tools.ant.wstools"
| classpathref="wstools.path" />
| <antcall target="call-wstools" />
| </target>
|
| <target name="call-wstools">
| <wstools dest="${output.java.dir}" config="${resources.dir}/wstools.xml" />
| <move file="${output.java.dir}/jaxrpc-mapping.xml"
| todir="${output.web.dir}" />
| </target>
|
| <target name="setup-wscompile" if="jwsdp.home">
| <taskdef name="wscompile"
| classname="com.sun.xml.rpc.tools.ant.Wscompile"
| classpathref="wscompile.path" />
| <mkdir dir="${output.classes.dir}" />
| <mkdir dir="${output.web.dir}" />
| <antcall target="call-wscompile" />
| <delete>
| <fileset dir="${output.java.dir}" includes="**/*_Impl.java" />
| <fileset dir="${output.classes.dir}" includes="**/*_Impl.class" />
| </delete>
| </target>
|
| <target name="call-wscompile">
| <wscompile fork="on"
| verbose="on"
| import="on"
| keep="on"
| features="norpcstructures,wsi,strict"
| base="${output.classes.dir}"
| sourcebase="${output.java.dir}"
| mapping="${output.web.dir}/jaxrpc-mapping.xml"
| config="${resources.dir}/wscompile.xml"
| classpathref="wscompile.path"
| jvmargs="-Duser.dir=${project.dir}" />
| </target>
|
| <target name="generate-artifacts"
| depends="detect-wsgenerator"
| description="generate java mapping artifacts">
| <mkdir dir="${output.java.dir}" />
| <antcall target="setup-wstools" />
| <antcall target="setup-wscompile" />
| </target>
|
| <!-- =================================== -->
| <!-- === CODE & RESOURCE COMPILATION === -->
| <!-- =================================== -->
|
| <target name="compile">
| <mkdir dir="${output.classes.dir}" />
| <javac destdir="${output.classes.dir}"
| classpathref="jboss.path"
| source="${javac.source}"
| target="${javac.target}"
| debug="${javac.debug}"
| deprecation="${javac.deprecation}">
| <src path="${java.dir}" />
| <src path="${output.java.dir}" />
| </javac>
| <copy todir="${output.classes.dir}">
| <fileset dir="${java.dir}" excludes="**/*.java" />
| </copy>
| </target>
|
| <!-- =========================== -->
| <!-- === WEB MODULE ASSEMBLY === -->
| <!-- =========================== -->
|
| <target name="pack-web" depends="compile">
| <war warfile="${output.dir}/${module.name}.war" webxml="${web.dir}/web.xml">
| <classes dir="${output.classes.dir}" />
| <webinf dir="${web.dir}" excludes="web.xml" />
| <webinf dir="${output.web.dir}" />
| </war>
| </target>
|
| <!-- ============================== -->
| <!-- === APPLICATION DEPLOYMENT === -->
| <!-- ============================== -->
|
| <target name="deploy"
| depends="pack-web"
| description="deploy application to server">
| <copy todir="${jboss.server.deploy.dir}"
| file="${output.dir}/${module.name}.war" />
| </target>
|
| <target name="undeploy" description="undeploy application from server">
| <delete file="${jboss.server.deploy.dir}/${module.name}.war" />
| </target>
|
| <target name="redeploy"
| depends="generate-artifacts, deploy"
| description="regenerate artifacts and deploy application" />
|
| <!-- ===================================== -->
| <!-- === APPLICATION CLIENT DEPLOYMENT === -->
| <!-- ===================================== -->
|
| <available property="client.available" file="${client.dir}" type="dir" />
|
| <target name="pack-client" if="client.available">
| <mkdir dir="${output.dir}" />
| <jar destfile="${output.dir}/${module.name}-client.jar">
| <metainf dir="${client.dir}" />
| <metainf file="${output.web.dir}/jaxrpc-mapping.xml" />
| <zipfileset dir="${jboss.server.dir}/data/wsdl/${module.name}.war"
| prefix="META-INF/wsdl" />
| </jar>
| </target>
|
| <target name="deploy-client" depends="pack-client" if="client.available">
| <copy todir="${jboss.server.deploy.dir}"
| file="${output.dir}/${module.name}-client.jar" />
| </target>
|
| <target name="undeploy-client" if="client.available">
| <delete file="${jboss.server.deploy.dir}/${module.name}-client.jar" />
| </target>
|
| <!-- ====================== -->
| <!-- === TEST EXECUTION === -->
| <!-- ====================== -->
|
| <available property="test.available" file="${test.java.dir}" type="dir" />
|
| <target name="compile-common">
| <mkdir dir="${common.classes.dir}" />
| <javac destdir="${common.classes.dir}"
| srcdir="${common.java.dir}"
| classpathref="jboss.path"
| source="${javac.source}"
| target="${javac.target}"
| debug="${javac.debug}"
| deprecation="${javac.deprecation}" />
| </target>
|
| <target name="compile-test" depends="compile-common" if="test.available">
| <mkdir dir="${output.test.classes.dir}" />
| <javac destdir="${output.test.classes.dir}"
| srcdir="${test.java.dir}"
| classpathref="test.path"
| source="${javac.source}"
| target="${javac.target}"
| debug="${javac.debug}"
| deprecation="${javac.deprecation}" />
| </target>
|
| <target name="run-test"
| depends="compile-test"
| description="test the deployed application"
| if="test.available">
| <antcall target="pack-client" />
| <mkdir dir="${output.test.reports.dir}" />
| <junit fork="on"
| forkmode="once"
| printsummary="on"
| haltonfailure="on"
| dir="${output.dir}">
| <sysproperty key="jbossws.target.server" value="jboss" />
| <classpath>
| <path refid="test.path" />
| <pathelement path="${output.test.classes.dir}" />
| </classpath>
| <batchtest todir="${output.test.reports.dir}">
| <fileset dir="${output.test.classes.dir}" includes="**/*Test.class" />
| </batchtest>
| <formatter type="xml" />
| </junit>
| </target>
|
| </project>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053075#4053075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053075
18Â years, 10Â months
[Performance Tuning] - Jboss performance - not using all available resources
by jamesdonnelly256
Hi,
We have a new server with 8 cpus and 12gb of ram. We can't get Jboss to exploit the CPU resources available, and we're not sure where the bottleneck is.
JBoss 4.0.5 resides on the main server, with MySql 5 running on a separate box, connected via a dedicated private gigabit ethernet. We're using Java 5.
Requests to the application get appended to a JMS queue running against the Mysql 5 server mentioned above.
Once the queue is populated, a message driven bean picks up from it to action the requests.
The CPU usage never goes beyond 40-50% of one CPU when Jboss is processing the queue.
The database server is practically idling during this time, as it has a raid 10 array of very fast disks and 4 CPU's. The network traffic between JBoss and Mysql is minimal, so that isn't the bottleneck either.
I have tested a small multi-threaded counting program, which proves that the JVM is more than capable of exploiting all 8 CPU's at 100%
We've adjusted most parameters we can think of to get JBoss to go faster, but nothing makes much of a difference, including connection pool settings, number of concurrent mdb's, thread pool settings.
It's using 2gb of Xms/Xmx (this is the maximum for one JVM right?)
If anyone has any pointers towards where to look for a bottleneck it would be very helpful.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053072#4053072
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053072
18Â years, 10Â months