Development

hibernate.id.new_generator_mappings

“true or false. Setting which indicates whether or not the new IdentifierGenerator implementations are used for AUTO, TABLE and SEQUENCE. Default to false to keep backward compatibility. Note We recommend all new projects to use hibernate.id.new_generator_mappings=true as the new generators are more efficient and closer to the JPA 2 specification semantic. However they are not

hibernate.id.new_generator_mappings Read More »

JBoss show JDBC Queries

Sometimes it is necessary to see which queries are executed and what the parameters of these queries have been. To get this data from a JBoss 7+ you have to follow these steps: Enable JDBC-Spy on Datasource: /subsystem=datasources/data-source=ExampleDS/:write-attribute(name=spy,value=true) Or just add spy=”true” as attribute in standalone.xml. Then you have to enable the spy by adding a

JBoss show JDBC Queries Read More »

JSF 2.2 ViewScoped

JSF 2.2 has the missing ViewScoped annotation working with CDI. Simply use @javax.faces.view.ViewScoped on your bean. Be careful NOT to mix up with @javax.faces.bean.ViewScoped. Example view scoped class: import javax.faces.view.ViewScoped; import javax.inject.Named; @ViewScoped @Named public class SenderView implements Serializable { } If you use the wrong annotation you will get weld errors when trying to inject an instance

JSF 2.2 ViewScoped Read More »

JBoss Maven Repository

To use the jboss maven repository under https://repository.jboss.org/nexus/ you have to add a profile in your settings.xml (~/.m2 or $M2_HOME/conf). <settings> … <profiles> … <profile> <id>jboss-public-repository</id> <repositories> <repository> <id>jboss-public-repository-group</id> <name>JBoss Public Maven Repository Group</name> <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-public-repository-group</id> <name>JBoss Public Maven Repository Group</name> <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> <layout>default</layout> <releases>

JBoss Maven Repository Read More »

Remove “Server” and “X-Powered-By” headers in wildfly 8.2.0

Just remove the following two lines <filter-ref name=”server-header”/> <filter-ref name=”x-powered-by-header”/> from your undertow config in standalone.xml. They are found under subsystem urn:jboss:domain:undertow:1.2 > server > host. Don’t forget to reload/-start your application server after these changes.

Remove “Server” and “X-Powered-By” headers in wildfly 8.2.0 Read More »

SSL in Wildfly 8.2.0

Since wildfly uses undertow the configuration of SSL has changed. You can follow these steps to get SSL running: Create a keystore with keys: cd $WILDFLY_HOME/standalone/configuration keytool -genkey -alias localhost -keyalg RSA -keystore keystore.jks -keysize 4096 You need to replace “localhost” with your domain name. NOTE: Your browser will complain that the connection is unsecure

SSL in Wildfly 8.2.0 Read More »

Widlfly 8.2.0 – JBAS010153: Node identifier is set to the default value

In the latest version of Wildfly (8.2.0) there is a warning looking like [org.jboss.as.txn] (ServerService Thread Pool — 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique. To get rid of this you have to change the standalone.xml file.  Change this part <subsystem xmlns=”urn:jboss:domain:transactions:2.0″> <core-environment> <process-id> <uuid/>

Widlfly 8.2.0 – JBAS010153: Node identifier is set to the default value Read More »