jboss

JBoss tip #5 Keeping the project in exploded .war file in some other location other than deploy folder

This is how you can increase your productivity while developing an app on Jboss, no need to package and deploy again and again, reduced development and testing time.

Open %JBOS_HOME%\server\default\conf\jboss-service.xml and add the new location

    <attribute name="URLs">
        deploy/, E:/ file:/var/opt/apps/
     </attribute>
1 Comment more...

JBoss tip #4 Increasing the jta time out from default 5 mins to more

Open %JBOSS-HOME%\server\default\conf\jboss-service.xml


name="jboss:service=TransactionManager">
3600
${jboss.server.data.dir}/tx-object-store

[/sourcecode language='css']

3600
[/sourcecode language='css'] by default it would be 300, here we changed it to 3600 which is 1 hr.


JBoss tip #3 Accessing the application out side the local machine

Open %JBOSS_HOME%\server\default\deploy\jboss-web.deployer\server.xml and change the address to “0.0.0.0″

     <Connector port="8081" address="0.0.0.0" maxThreads="250" maxHttpHeaderSize="8192"
        emptySessionPath="true" protocol="HTTP/1.1"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true" />

Jboss tip #2 Changing the default port number 8080 to some other port

Open %JBOSS_HOME%\server\default\deploy\jboss-web.deployer\server.xml and change the port as per your requirement.

<Connector port="8081" address="0.0.0.0" maxThreads="250" maxHttpHeaderSize="8192"
        emptySessionPath="true" protocol="HTTP/1.1"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true" />

Jboss tip #1 Connection Pooling And DataSource creation

Which ever data source you create (for instance lets say for oracle data source or mysql data source ) file name should end with “name-ds.xml” and the content should be

<?xml version="1.0" encoding="UTF-8"?>

   <datasources>
         <local-tx-datasource>
           <jndi-name>tjOracleDS</jndi-name>
            <use-java-context>false</use-java-context>
                   <connection-url>jdbc:oracle:thin:@localhost:1521:tjdb</connection-url>
                   <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                     <user-name>staging</user-name>
                   <password>staging</password>
                    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
                        <min-pool-size>5</min-pool-size>
                   <max-pool-size>30</max-pool-size>
                   <blocking-timeout-millis>5000</blocking-timeout-millis>

                 <metadata>
                    <type-mapping>Oracle9i</type-mapping>
                 </metadata>
         </local-tx-datasource>

       </datasources>
<use-java-context>false</use-java-context>   

This help us to remove java:comp from jndi look up for data source

1 Comment more...

  • TechJini Solutions

  • © Copyright 2009 TechJini Solutions Private Limited. All Rights Reserved
    iDream theme by Templates Next | Powered by WordPress