Thursday, July 17, 2014

review Building an App UI with PrimeFaces

A packt video on how-to develop Primefaces apps has been released.

I had the opportunity to make a little review. Here are my main points.

It is quite an interesting set of video, that guide you step by step through the build of a Primefaces over MongoDB web app, spring gluing the component for smooth integration.
It is worth following, since you can quickly cover and being introduce to couple of market-trendy technologies.
The videos are developers oriented, via the use of NetBeans to fasten your primefaces component development. JSF beginner to intermediate definitely should have a lot at them.

Thursday, July 3, 2014

Packt's 10-year anniversary

Join in the celebrations of Packt's 10-year anniversary! All eBooks & videos are available for just $10! Visit

Tuesday, May 6, 2014

Packt celebrates International Day Against DRM, May 6th 2014

According to the definition of DRM on Wikipedia, Digital Rights Management (DRM) is a class of technologies that are used by hardware manufacturers, publishers, copyright holders, and individuals with the intent to control the use of digital content and devices after sale.

However, Packt Publishing firmly believes that you should be able to read and interact with your content when you want, where you want, and how you want – to that end they have been advocates of DRM-free content since their very first eBook was published back in 2004.

To show their continuing support for Day Against DRM, Packt Publishing is offering all its DRM-free content at $10 for 24 hours only on May 6th – that’s all 2000+ eBooks and Videos. Check it out at:

Tuesday, April 22, 2014

Primefaces extension in minuteproject

Primefaces extension well-detailed in packt book offer to primefaces users interesting add-ons over the primefaces framework :

  • reporting facilities
  • smart input components
  • layout and screen blocking components
  • time-tracking and scheduling components
It complements seamlessly the primefaces ecosystem - the integration with maven can be done alongside primefaces dependency.

Primefaces extension book guides you thru a those component providing both API explanations (JSF and beans) as well as source code examples.

Regarding minuteproject 4 primefaces, integration of reporting elements and validation is a feature to add in next releases.

Thursday, March 20, 2014

packt 2000 titles

Packt promo!

Celebrate 2000 Titles with Packt with the BUY ONE, GET ONE FREE offer! 

Check it out at! #Packt2k

Monday, January 6, 2014

how-to cloudbees minuteproject 4 openxava

Minuteproject releases a demo Openxava application to be hosted on cloudbees at

Following those steps, you can recreate an Openxava application with minuteproject and host it on cloudbees.
All those steps are IDE-free (i.e. productivity oriented) all is done by command line!
This is a requirement for automation, since it is very easy to integrate with a CI tool such as Jenkins.
Meanwhile the code is compatible with Eclipse (for java), Mysql Workbench (for DB design + release) and Cloudbees website for manual release.


Generate an openxava application with minuteproject base on an DB structure.
The database use here is petshop; for the generation the database can be local or already hosted on cloudbees PaaS. At running the database is the one of the cloudbees PaaS.

The generated Openxava compliant artifacts are built into an Openxava application.
The application is to be deployed on a tomcat server.
The application relies on a JNDI Datasource on the tomcat server.

After setting the database on cloudbees and the connection pool cloudbees tomcat server, the application can be deployed.



JDK 1.6+
Minuteproject last version
Openxava 4.9
Mysql DB

  • sdk
  • account

Set up Cloudbees


Create a mysql db schema on cloudbees
bees db:create petshopDB
Retrieve the DB info (connection info: server, port, user...) all you need to create you connection pool

bees app:info -db petshopDB 


Create application

bees app:create -petshopox


This is use get the alias use in the persistence.xml datasource (java:comp/env/jdbc/petshopDS)

bees app:bind -db petshopDB -a petshopox -as petshopDS 

Database setup

Run you database script from the information receive via $bees db:info -db petshopDB

mysql --user=xxxx --password=xxxx --port=3306 xxx < petshop.sql
petshop-mysql.sql can be found in MP_HOME/sample/schema/


Full details at
The generation is done by Minuteproject.
Minuteproject generation by command line comes by passing a configuration file name to model-generation.

model-generation petshop.xml

Sample petshop.xml configuration
<!DOCTYPE root>
<generator-config xmlns=""
	<!-- adapted for cloudbees petshop model -->
			<target-convention type="enable-updatable-code-feature" />
		<model name="petshop" version="1.0" package-root="">
				<driver name="mysql" version="5.1.16" groupId="mysql"
				<primaryKeyPolicy oneGlobal="false">
					<primaryKeyPolicyPattern name="autoincrementPattern"></primaryKeyPolicyPattern>
					<condition type="exclude" startsWith="DUAL"></condition>
					<condition type="exclude" startsWith="ID_GEN"></condition>
					<condition type="exclude" startsWith="SEQUENCE"></condition>
				<business-package default="pet">
					<condition type="package" startsWith="PRODUCT" result="product"></condition>
					<condition type="package" startsWith="ITEM" result="product"></condition>
						<entity-naming-convention type="apply-strip-table-name-prefix"
							pattern-to-strip="SYS,FIN" />
							type="apply-referenced-alias-when-no-ambiguity" is-to-plurialize="true"></reference-naming-convention>
					<package name="product">
						<entity-group entities="PRODUCT"></entity-group>
						<entity-group entities="ITEM"></entity-group>
					<entity name="PRODUCT" alias="MY_GOOD_PRODUCT">
					<entity name="ITEM" alias="MY_GOOD_ITEM" comment="my item table">
						<field name="PRODUCTID" alias="THIS_IS_MY_PRODUCT" comment="my product field reference"></field>
					<entity name="CATEGORY" content-type="reference-data">
						<field name="DESCRIPTION" ordering="asc" label="my description"
						<field name="NAME" ordering="asc"></field>
					<entity name="TAG" content-type="reference-data">
						<field name="TAG" ordering="asc">
								<sql-path path="NAME" />
						<sdd-dummy-primarykey-convention add="true" />
					<query name="get address abstract" id="dashAddress" type="dashboard"
						<query-body> <!-- dimensions column first -->
<![CDATA[select city, count(*) as nb from address group by city order by count(*) desc limit ?]]>
							<query-param name="top city" is-mandatory="false"
								type="INT" sample="37" default="10"></query-param>
					<query name="get address summary" id="dashCity" type="dashboard"
						<query-body> <!-- dimensions column first -->
<![CDATA[select city, count(*) as nb, count(*) as nb2 from address group by city order by count(*) desc]]>
					<query name="get addresses by criteria" id="c">
<![CDATA[select * from address where lcase(city) like ?]]>
							<query-param name="city" type="STRING" sample="'S'"
								convert="lowercase,append%" default="%">
		<targets catalog-entry="OpenXava" >
			<property name="environment" value="remote"></property>
			<property name="cloud-platform" value="cloudbees"></property>
			<property name="embed-driver" value="true"></property>

Appart from the 'classical' enrichment facilities, the interesting point are the properties under the targets node:
name="environment" value="remote" 
Implies to use a connection pool (for persistence.xml)
name="cloud-platform" value="cloudbees" 
Performs additional build facilities for Openxava on cloudbees
The OX war has to hold jta.jar, ejb.jar, mysql driver jar.
  • jta.jar and ejb.jar are embedded in tomcat/lib on the OX delivery.
name="embed-driver" value="true" 

  • mysql driver jar is shipped on MP delivery

  • Remark: the last 2 options are available on Minuteproject 0.8.6


    On the generated directory
    set/export OX_HOME
    set/export MP_HOME


    The application petshop.war goes into OX_HOME/workspace/petshop.dist

    The application is ready to be deployed on Cloudbees.


    bees app:deploy -a petshopox -t tomcat7 -Rjava_version=1.7 petshop.war

    petshopox is the name of the application on cloudbees