Reading properties in EJB

One of the most compelling needs of applications is to read initialization properties. If your application is EJB-centric, then a very simple strategy is to read the properties from a File and store them in an EJB Singleton. Here is how to do it. At first here is how our application looks like: DemoApp.war | … Read more

Accessing ServletContext and ServletRequest in CDI Beans

Today I’ve found one interesting question on StackOverFlow of one user asking to read the web.xml context params from a CDI Bean. Luckily it’s not complicated at all to accomplish this task. In order to be able to read the web.xml context-params from a CDI Bean all you need to do is injecting the ServletContext … Read more

Categories cdi

Extending PrimeFaces: AJAX

This is the last of a series of posts (Extending PrimeFaces components is the first one, here the second one) with the purpose of explaining how to use PrimeFaces as an API to create new JSF components. Our main focus in this article is to add AJAX listeners to our components. The component that we are going … Read more

Monitoring a cluster using WildFly API

WildFly 8 introduces a new API which can be used to gather information about the WildFly cluster topology and receive notifications when new nodes leave or join the cluster.   The org.wildfly.clustering.group.Group interface can be used for this purpose: The Group service provides a mechanism to view the cluster topology and to be notified when … Read more

Monitoring a JBoss Domain using JBoss Operations Network

As per definition, in a JBoss AS 7/WildFly Domain there can be at most one Domain Controller, which is in charge to manage the other Host Controllers and the Domain configuration. In this tutorial we will show how to check for the Domain Controller availability using JBoss Operations Network and get a notification in case … Read more

Extending PrimeFaces components

  The purpose of this post is to show how we can use PrimeFaces base classes to create new custom components. In a nutshell we will see how to extend PrimeFaces. We will do that by developing a simplified version of the PrimeFaces Extensions Analogclock. Let’s start with the component class: @FacesComponent(value = AnalogClock.COMPONENT_TYPE) @ResourceDependencies({ … Read more

Inheritance hibernate

Using Inheritance with Hibernate JPA. Featured articles: Mapping Table per Concrete Class Using Table per subclass strategy Using table per class hierarchy

Hibernate Query Articles

List of Hibernate Query Articles   How to see the SQL generated by Hibernate Hibernate and JPA named query example Hibernate Query by example How to open an online cursor with Hibernate? Using native Queries with Hibernate and JPA How to call a stored procedure with Hibernate ? How to paginate your Entity How to … Read more