Author name: Manuel Bogner

Make your webapplication log debug messages under jboss

I often catch myself writing info-messages because jboss is configured to info-mode by default. By adding the following few lines you can make your application use debug mode: <subsystem xmlns=”urn:jboss:domain:logging:2.0″> … <!– add begin –> <console-handler name=”DEBUGCONSOLE”> <level name=”DEBUG” /> <formatter> <pattern-formatter pattern=”%d{HH:mm:ss,SSS} %-5p [%c] (%F:%L) %s%E%n” /> </formatter> </console-handler> <logger category=”pm.mbo” use-parent-handlers=”false”> <level name=”DEBUG”

Make your webapplication log debug messages under jboss Read More »

Create instance of javax.validation.Validator manually

To bootstrap javax.validation.Validator you can simply use the following code: final ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); final Validator validator = factory.getValidator(); For further information documentation see for version 5.1 http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/chapter-bootstrapping.html#section-retrieving-validator-factory-validator for version 4.3 http://docs.jboss.org/hibernate/validator/4.3/reference/en-US/html/validator-bootstrapping.html#section-validator-instance

Create instance of javax.validation.Validator manually Read More »

Get rid of Wildfly/JBoss headers “Server” and “X-Powered-By”

If you don’t want to send these headers with every response you have to disable them in your configuration file (standalone.xml). I just removed the following lines from my undertow subsystem (urn:jboss:domain:undertow:1.1): <filter-ref name=”server-header”/> <filter-ref name=”x-powered-by-header”/> … <response-header name=”server-header” header-name=”Server” header-value=”WildFly/8″/> <response-header name=”x-powered-by-header” header-name=”X-Powered-By” header-value=”Undertow/1″/> After a server restart the headers were gone.

Get rid of Wildfly/JBoss headers “Server” and “X-Powered-By” Read More »

Eclipse Luna Performance

To speedup eclipse I first edited the eclipse.ini file to look like this (don’t just copy paste my file – compare it with yours): -vm /opt/jdk1.8/jre/lib/amd64/server/libjvm.so -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar –launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140521-1744 -product org.eclipse.epp.package.jee.product –launcher.defaultAction openFile -showsplash org.eclipse.platform –launcher.defaultAction openFile –launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms60m -Xmx1024m -Xss2m -Xverify:none -Duser.name=mbo I removed lines setting MaxPermSize as this is deprecated in

Eclipse Luna Performance Read More »