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

Thursday, June 16, 2016

Install JBoss as Windows Service

Env: JBoss EAP 6.4
Windows 7, 10

1- Get the native utility of JBoss. It is available if using JBoss jar installer. If you don't have it get the jar and install somewhere and copy the "native" directory from the following path to the same path of your JBoss:


EAP-6.4.0\modules\system\layers\base\

2- Use the following script and put it in a bat file on the same directory as JBoss directory, then run it.

set BASE=%~dp0

setx /M JBOSS_HOME %BASE%\jboss-eap
setx /M NOPAUSE 1
echo %BASE%

%BASE:~0,2%

cd %BASE%\jboss-eap\modules\system\layers\base\native\sbin

service.bat install /startup /name JBossAppSrv /jbossuser admin /jbosspass 'adminPass'

Just for clarification, the mandatory parts are:
Set system env variable JBOSS_HOME and NOPAUSE=1
Run the "service.bat install "command.

Ref: JBoss 6.4 Installation Guide

Saturday, June 11, 2016

Some Grails Tricks

Set log level in running instance by console

import org.apache.log4j.*
Logger.getLogger("mt.omid.rira.DataService").level = Level.DEBUG

Set grails environment in app server (using same war file for test/release), great for testing in JBoss

Environment variable grails.env can be set to proper environment like development or production.
or

CATALINA_OPTS=-Dgrails.env=development

In JBoss System properties part in Configuration section accept key/value pair that is used for the same purpose.

Friday, May 13, 2016

JBoss JNDI SQLServer and Integrated Windows Authentication

Copy the sqljdbc_auth.dll (32 or 64 according to your jre) to bin folder of your jre (in jdk also copy to jre/bin).

In JBoss data source url set integratedSecurity=true .