Kohei Nozaki's blog 

Disabling Roller cache for development


Posted on Friday Feb 27, 2015 at 09:43PM in Roller


When I playing with Roller source code, Roller’s caching mechanism is not comfortable because my changes are not affected until I redeploy entire application. it destroys benefit of using JRebel. so I disabled Roller’s caching mechanism with following definition in roller.properties. it would work with roller-custom.properties too.

cache.sitewide.enabled=false
cache.weblogpage.enabled=false
cache.weblogfeed.enabled=false
cache.planet.enabled=false
cache.salt.enabled=false

Also you need to disable 2nd level cache of EclipseLink. put following definition to persistence.xml.

<property name="eclipselink.cache.shared.default" value="false"/>

<shared-cache-mode>NONE</shared-cache-mode>

Velocity cache too. configuration is available at /app/src/main/webapp/WEB-INF/velocity.properties:

theme.resource.loader.cache=false
roller.resource.loader.cache=false
class.resource.loader.cache=false
webapp.resource.loader.cache=false

Container’s JSP cache too. for WildFly see /roller/kyle/entry/exploded-deployment-for-wildfly-on


Setting longer startup / shutdown timeout to wildfly-init-redhat.sh


Posted on Friday Feb 27, 2015 at 03:27PM in WildFly


I’m using bin/init.d/wildfly-init-redhat.sh to operate WildFly instance via service command on CentOS. it has some timeout defaults as follows:

if [ -z "$STARTUP_WAIT" ]; then
        STARTUP_WAIT=30
fi

if [ -z "$SHUTDOWN_WAIT" ]; then
        SHUTDOWN_WAIT=30
fi

If startup or shutdown takes longer than 30 seconds, the service commands will stop waiting and finished. this brings trouble to some automation mechanism such as shell scripts for deployment on cheaper environment. these variables can be set more longer in /etc/default/wildfly.conf as follows.

## The amount of time to wait for startup
STARTUP_WAIT=1800

## The amount of time to wait for shutdown
SHUTDOWN_WAIT=1800

There’s a template for this file at bin/init.d/wildfly.conf in WildFly distribution.


Getting dependencies with Maven dependency plugin


Posted on Friday Feb 27, 2015 at 11:30AM in Maven


I want to get all of dependencies of:

<dependency>
    <groupId>org.jboss.as</groupId>
    <artifactId>jboss-as-controller-client</artifactId>
    <version>7.2.0.Final</version>
</dependency>

So, create pom.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.nailedtothex</groupId>
    <artifactId>get-dependencies</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-controller-client</artifactId>
            <version>7.2.0.Final</version>
        </dependency>
    </dependencies>

</project>

Then issue:

$ mvn dependency:copy-dependencies

Then you will get:

$ ls -l target/dependency/
total 2824
-rw-r--r--+ 1 kyle  staff    3933 Feb 27 11:25 jboss-as-build-config-7.2.0.Final.jar
-rw-r--r--+ 1 kyle  staff  177511 Feb 27 11:25 jboss-as-controller-client-7.2.0.Final.jar
-rw-r--r--+ 1 kyle  staff   96612 Feb 27 11:25 jboss-as-protocol-7.2.0.Final.jar
-rw-r--r--+ 1 kyle  staff   92053 Feb 27 11:25 jboss-dmr-1.1.6.Final.jar
-rw-r--r--+ 1 kyle  staff   55248 Feb 27 11:25 jboss-logging-3.1.2.GA.jar
-rw-r--r--+ 1 kyle  staff  229373 Feb 27 11:25 jboss-marshalling-1.3.16.GA.jar
-rw-r--r--+ 1 kyle  staff  238355 Feb 27 11:25 jboss-remoting-3.2.14.GA.jar
-rw-r--r--+ 1 kyle  staff   89315 Feb 27 11:25 jboss-sasl-1.0.3.Final.jar
-rw-r--r--+ 1 kyle  staff  119912 Feb 27 11:25 jboss-threads-2.1.0.Final.jar
-rw-r--r--+ 1 kyle  staff  241808 Feb 27 11:25 xnio-api-3.0.7.GA.jar
-rw-r--r--+ 1 kyle  staff   80070 Feb 27 11:25 xnio-nio-3.0.7.GA.jar
$