Skip to main content

Posts

Showing posts from 2013

Change default JAVA_OPTS in JBoss 7

To change JVM memory options in JBOSS 7 for standalone server, find the file standalone.conf.bat in bin directory and edit the file like below. rem # JVM memory allocation pool parameters - modify as appropriate. set "JAVA_OPTS=-Xms3072M -Xmx3072M -XX:MaxPermSize=1024M"

JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]

To resolve this error, edit the below in \jboss-as-7.1.1.Final\standalone\configurationstandalone.xml find the below lines and add deployment-timeout. <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">             <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>         </subsystem> <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">             <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="1200" />         </subsystem>

Rest Client addon on Firefox/Chrome to test restful services & web pages

https://addons.mozilla.org/en-us/firefox/addon/restclient/ Using this browser extension we can test our restful services as well as web pages by proving some request headers.  I am testing my application (java code) by providing cookie, this will be fast for debugging, no need enter values every time in browser. Just capture the request data from chrome developer console/ firebug once and hit the server with same data or modified one. it is easy & very helpful.

SQLQuery.executeUpdate() will invalidate hibernate's second level cache

when SQLQuery.executeUpdate() called all second level cache will be invalidated.  Example: SQLQuery query = session.createSQLQuery("UPDATE TABLE ....."); query.setInteger("status", 1); query.executeUpdate(); To avoid: SQLQuery query = session.createSQLQuery("UPDATE TABLE ....."); query.setInteger("status", 1); query.addsynchronizedqueryspace("TABLE");  query.executeUpdate(); details here: http://www.link-intersystems.com/bin/view/Blog/Hibernate's+second+level+cache+and+native+queries