Showing posts with label JBoss. Show all posts
Showing posts with label JBoss. Show all posts

Wednesday, June 22, 2011

Jboss 4: Change default port 8080

1. Goto the deploy folder of the server instance you use. (ie default):  C:\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer

2. Find the file named server.xml inside that folder.

3. Look for the HTTP Connector section inside the server.xml where 8080 configuration is available. Change the port value to what ever the required port number:

<Connector port="8080" address="${jboss.bind.address}"   
         maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" />

PD. This change wiill be available when JBoss is restarted.

Reference:
http://lkamal.blogspot.com/2006/09/jboss-4-how-to-change-port-8080-in.html

Wednesday, June 8, 2011

Jboss: Configure IP access

To configure the IP address of the server


run -b 192.168.1.1

If the server has multiple IP addresses and you want to access jboss from any of them:

run -b 0.0.0.0


Source:
http://www.mateamargonerds.com/programacion/42-lenguajejava/570-jboss-configurar-ip-de-acceso.html

Jboss: Configuring Connection to MS SQL Server 2005


1. Delete JBOSS_HOME/server/default/deploy/hsqldb-ds.xml

2. Copy JBOSS_HOME/docs/examples/jca/mssql-ds.xml to JBOSS_HOME/server/default/deploy.

3. In the new copy of mssql-ds.xml, I edit the connection-url, user-name and password elements to match my local SQL db instance:
from:
<jndi-name>MSSQLDS</jndi-name>
    <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url>
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
    <user-name>x</user-name>
    <password>y</password>
to:
    <jndi-name>DefaultDS</jndi-name>
    <connection-url>jdbc:sqlserver://172.16.9.198:1433;DatabaseName=TESTDATABASE</connection-url>
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
    <user-name>testuser</user-name>
    <password>testpassword</password>

notice that jdbc:microsoft:sqlserver was changed to jdbc:sqlserver

4. Delete the file JBOSS_HOME/server/default/deploy/jms/hsqldb-jdbc2-service.xml.

5. Copied JBOSS_HOME/docs/examples/jms/mssql-jdbc2-service.xml into the folder JBOSS_HOME/server/default/deploy/jms

6. In the new copy of mssql-jdbc2-service.xml, replace the string MSSQLDS with DefaultDS:
from:
<depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=MSSQLDS</depends>

To:

<depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>

8. Copy the MSSQL JDBC driver sqljdbc.jar to JBOSS_HOME/server/default/lib.

Resources:

Tuesday, February 1, 2011

How to run Jboss on port other than 8080

On (4.0.2) release of JBoss , you need to edit the server.xml file located in $jboss_home/server/default/deploy/jbossweb-tomcat55.sar (assuming you are using the default configuration.

In that file, you need to change the port attribute in the Connector entry. e.g.

<Server>
<Service name="jboss.web"
className="org.jboss.web.tomcat.tc5.StandardService">

<!-- Change this value to the port you want to use. -->
<Connector port="8080"
... 


Source: http://www.coderanch.com/t/89645/JBoss/run-Jboss-port-other-than