le Wadablog

Aller au contenu | Aller au menu | Aller à la recherche

dimanche 1 mars 2015

PROTIP : Download the same Forge version for the shell, that you have in JBoss Developper Studio

PROTIP : In order to download the same Forge version for the shell, that you have in JBoss Developper Studio, you can cheat with the URL given on the website, which is


and replace LATEST with the expected number, like 2.13.0.Final to be in synch with the version available in JBDS GA v8.0.2

This way, you will not get version issues by compiling your addon with a version different that the one used at runtime.

New article in the kiosks / Nouvel article dans la presse

(FR) Retrouvez mon article sur JBoss Forge dans GNU/Linux Magazine France n°180 de mars 2015.

(EN) My article on JBoss Forge is published in GNU/Linux Magazine France #180, March 2015.

lundi 21 avril 2014

Anecdotes, DevoxxFr 2014

As always, DevoxxFr was a wonderful conference with plenty of talks, worth inventing cloning in order to attend them all.
It's also the occasion to meet people from the interwebs I mean person I communicated with via electronic means, former colleagues and more people.

Because that's what it is, an event to fill up the brain, generate crazy ideas (more on that in a few months) and meet people who actually talk the same IT lingo.

I have had the luck to meet Phillipe, whom I consider highly because of his publications like his Play! ebook. He is also a good curator for technologies.
Emmanuel, former co-detainee.
Antoine of CDI fame
Christophe, friend & former colleague   
Fabien, in my tech sphere for years.
And José, Nicolas, Antonio
There were also international geeks like Arun Gupta, David Delabassee (whose Arduino prez. of last year was awesomely clear).
New Java Champion David Gageot was here too.
Audrey of Ted & Devoxx4Kids fame.
Didier, François, ....

Also lots of talented people
I also met again Horacio (http://www.lostinbrittany.org/blog/).
First anecdote is that he trained & worked with Jerome, my coworker (yes, two Jerome in a room).

As he happened to be with Thierry Chatel of AngularJS training fame, I told them how I learned to use AngularJS.
And because they found it funny, here we go for this post.

There was two determining facts for me to use AngularJS. First, I was looking for something more productive than JQMobile for a next mobile app.
Second, I wanted to try this new stuff.

Also, I found that I was writing some repetitive code for a Spring-based project using stored procedures.
And that bored me.
And I'm a guy who generates SQL or Java code with a spreadsheet.
So I used Angular to generate my Java code.
There will not be any screen capture because confidentiality and also, because I'm at home :)

How it works.

Display page
Input procedure name & validate. Query is made to the server, its a simple Spring controller that will return JSON describing the input parameters for the procedure (JDBC metadata).
JSON is used to create a dynamic form.
User inputs values & validates.
Controller uses the values to execute the procedure. Then returns JSON describing the output.
For each column, there is a line in a second form. 
Users inputs the types and names to be used in Java, a description that will become a comment.
Other inputs are for the DTO & DAO names.
Under the user's eyes is generated the wiki page (wiki syntax)
The rest of the page contains the sources for the DTO, the DAO, the interfaces.
Everything just needing some copy/paste in the IDE and some tuning because all camelCase is not perfect).

There is way more to say about this conf'.
To make it short, I want to go again next year, hoping to see my friend Romin in this part of Earth : Palais des congrès de Paris, 8-10 april 2015.

dimanche 23 février 2014

StartApp banner ads in an Android app built with AndroidAnnotations

If you want to put a StartApp ads banner in an Android app built with AndroidAnnotations, as the documentation says that you must do StartAppAd.init() in the onCreate() which you don't write when you use AA, well this is how to do
public void pub() {
StartAppAd.init(this, "XXXXXX", "XXXX");
and of course, you insert the relevant xml copy-pasted from the StartApp pdf, in your layout

It works on my machine :)

mardi 7 février 2012

JPA, EclipseLink and the DOH!

There is something you must know exists when you encounter problems of the "does not work as expected" kind.

This is
<property name="eclipselink.logging.level" value="FINEST"/>
that you must put in persistence.xml to get spammed in your console and check, for example, that all your entities are recognized.

Oh, and prefer 


if you want to master the table name used. 

Else this is your entity that is renamed and you'll get your queries wrong ;-)

jeudi 24 mars 2011

(FR) Application "Contrepeteries" pour Android

Entre autres choses, j'apprécie les traits d'esprit et les jeux de mots.
Il y a quelques années, je me suis intéressé aux contrepeteries et j'ai constaté que le web n'en manquait pas, mais qu'il y avait souvent les mêmes, dupliquées de sites en sites.
J'ai initié le site http://contrepeteries.free.fr pour qu'il soit collaboratif : que les visiteurs l'enrichissent et puissent récupérer les contrep's pour les utiliser sur d'autres supports.
Il y a eu des échanges fructueux avec le créateur d'une appli pour mac, des visiteurs qui ont beaucoup participé (Merci encore à Maud du fond du champ).
Mais le site vivote à 50 visites par jour.

Comme dirait le chien parlant que je n'ai pas : ça c'est de la niche !

A partir des données de mon site, j'ai créé une appli pour smartphones Android.

Elle s'enrichira au fil des versions. Aujourd'hui (v1.1), elle permet de

  • consulter +500 contrepeteries au hasard
  • partager la contrepeterie affichée (par mail, facebook, twitter, etc ...)
  • voir la liste des évolutions à venir (affichage des solutions est l'évolution la plus demandée)

Voici le lien vers le market web https://market.android.com/details?id=org.wadael.contrepeteries

Et le QR code correspondant

Amusez-vous bien et donnez-moi votre avis.

lundi 9 août 2010

Goodbye to Wave

As you may know, Google Wave will be stopped by the end of the year.
For sure, that's a bad surprise.
RIP Google Wave  20 May - 4 August 2010

For me, it means that the WRF ends too. Actually, it ends now.
Sure, there's plenty of time between now and december but I have already spent a lot of time on WRF.

The generator may find a second life, who knows ... it's only the templates that must be changed.

However, WRF was a very good experience for many things.
First is my collaboration with Romin  (@iRomin), who has become a friend. Mon ami, our daily (live) exchanges through Wave were lots of fun and knowledge sharing.

I gained pride as WRF was for a long moment (during the V1 days) the subject of three (from eleven) articles listed on the dedicated page on google's site.

Not bad for a project done little by little on my sleeping time (meaning I was often half asleep while coding)

Thanks to @fbaligand, I had the occasion to speak of WRF during the "JumpCamp 4 IT" event in Paris. My first public speaking since ... long ago.
I proposed to present WRF and a usage of it at the Devoxx 2010 conference. Well, no answer yet but I think I know it.
I really wanted a MAJOR speaking experience to push my limit. Too bad. Have to create something else.

During Google I/O, I have met people who followed me on twitter and knew my project, have met googlers IRL, spoke of WRF to some of them.
I even chatted with Vic G (fantastic speaker) !
Incredible San Francisco where three French guys named Jérôme can stand in the same square-meter (have a look at SnapABug.com). That never happened to me in France as Jérôme is a quite rare first name.

About Googlers, Wave's DevRel @pamelafox is a fantastic I.T woman. Talented, funny, clear minded and such a good speaker.

I am certainly forgetting other + points about the WRF episode.

Overall, the Wave experience was very good for me that's why I am so bitter that it's over.
So, goodbye Google Wave, rest in pieces, we'll meet again.

dimanche 29 novembre 2009

Feed your other self (twitter, GAEJ,CRON,Twitter4J )

Introduction and goal

As I know that will help at least one person, here is how I publish new spoonerisms on my other Twitter account @kontrepeteries on a regular and automated basis.

(A) Solution

The solution I chosed is to CRON a servlet deployed on GAE/J. This servlet uses Twitter4J, a very quick & simple API.

Servlet code

The code is shortened for brevity.

Actually, the servlet displays what is tweeted so that I could verify all went well at write+test time.

public class FetchLatestContrepServlet extends HttpServlet {

        protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException 
                // get spoonerism (gets PHP-generated JSON from my Free.fr website and unmarshall it)
                Contrep c = VaVoirChezFree.getUneContrepAvecIdSuperieur(bi.getHighestContrepId()); // just the id of the latest fetched contrep as parameter. 
                // UPD twitter status
                Twitter tw = new Twitter("YOUR_LOGIN","YOUR_PASSWORD");
                try {
                        tw.updateStatus( c.getText() );
                } catch (TwitterException e) {
                        log("twitter update error " + e.getMessage() );

                writer.append( c.getId() );
                writer.append( c.getText() );


Do usual conf in war\WEB-INF\web.xml

Example for file war\WEB-INF\cron.xml.

<?xml version="1.0" encoding="UTF-8"?>
                <url>YOUR APP-RELATIVE URL HERE (starts with /) </url>
                <description>tweete a spoonerism</description>
                <schedule>every 8 hours</schedule>

There is a possibility to restrain usage to the "admin" role so that you get sure it's only executed by the CRON launcher. See official documentation. But if you want to run it by hand, don't.


No rocket science here. This is how to do a CRON in GAEJ, you may modify this code to read tweets on a regular basis and save them to wherever you want (cloud, Free, ....).

If you have an Android device and a wave account, you may also check A wave regularly to save new blips to another place (twitter, DB) so that you can use your own (lighter) client to read waves. I've been told GW is slow on Android,

IMO, for wave-to-whatever data-transfer, use a wave robot.

Stay tuned for the release of my wave robot framework.

Meanwhile, if you understand French wordplays, @kontrepeteries may entertain you.

Follow me @wadael , it's sometimes worth it.

See you


mercredi 18 novembre 2009

Google Wave, how many different robot types

Being a java guy for quite some time, I got interested in Google App Engine (later GAE) as soon as it supported Java.

I can be used to host web application as you know and, more recently, Google Wave (later GW) robots.

For instance, GW robots can only be hosted on GAE for the moment.

I wrote a robot, following the tutorial and found it very brain-teasing. You know, robots, A.I., .... stuff you have read/seen times and times. It is now put at hand's reach (well sort of) and it's no use knowing the Lisp language to write one.

My robot is rather simple, it's only action is to react to the content of a blip (roughly the same as a post), find the longest word (that is more than 5 characters) and display in another blip all the contrepeteries (French for spoonerisms) known to it (500 entries to choose from), containing the selected word.

Browsing some waves, I recognized different groups of GW robots :
  • those that modify a blip  (add a map, replace :) with a picture of a smiley, ...)
  • those that react to a blip (like mine)
  • presumably, those that work in stealth mode, doing whatever they can like logging blips, participants, ...
  • those that react to commands, like Today Special Robot 
That last group is the one I find the most intelectually teasing.
Of course this is vast, but there is space for something I can do.

Stay tuned for more ...

mardi 29 septembre 2009

JavaBarCamp Paris 17

Mon feedback sur le javabarcamp du 29 09 2009 à Paris

Lire la suite...

dimanche 23 août 2009

Bien savoir sur quel GlassFish on travaille :)

GlassFish est un superbe produit.
J'ai travaillé avec la v2 et j'en suis plus satisfait que d'autres beaucoup plus chers.
Un problème que j'ai rencontré est d'administrer le serveur de pré-prod au lieu du serveur de développement. Les deux étant de la même version, la console (webapp) d'administration est la même :)

Donc, voila comment j'ai éteint la pré-prod :) (pas longtemps)

J'ai pensé à rendre le style de l'affichage du nom du serveur plus claquant, plus visible.

Après recherche, la CSS est planquée au fond d'un JAR. Et en plus l'appli. est en JSF.

Sur un forum (http://forums.java.net/jive/thread.jspa?threadID=64679&tstart=0) , on me remémore GreaseMonkey. Qui permet de faire tourner des scripts Javascript sur des pages une fois chargées.

Un coup de FireBug plus tard, l'identifiant du texte est trouvé.
  • GlassFish v2 : propertyForm:Masthead_serverInfo
  • GlassFish V3 : headerForm:Masthead_serverInfo

Ci-dessous le code pour GF v2
// GlassFish V2 - HOST WARNING
// version 0.1 BETA!
// 2005-04-22
// Copyright (c) 2009, Jerome BATON
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
// --------------------------------------------------------------------
// This is a Greasemonkey user script.
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
// To uninstall, go to Tools/Manage User Scripts,
// select "Hello World", and click Uninstall.
// --------------------------------------------------------------------
// ==UserScript==
// @name          GFV2_ADMIN-UI__HOST-WARNING
// @namespace     http://jeromeb.free.fr/greasemonkey/gf2admin_host
// @description   Script to display the host in a more distinguishable way (bigger)
// @include       http://localhost:4848/*
// @include*
// @exclude       http://diveintogreasemonkey.org/*
// @exclude       http://www.diveintogreasemonkey.org/*
// ==/UserScript==
    // headerForm:Masthead_serverInfo
    var tag = document.getElementById('propertyForm:Masthead_serverInfo');
    var txt = document.getElementById('propertyForm:Masthead_serverInfo').innerHTML ;
    var nvoTxt ='';
    if(txt != 'localhost' && txt != '')  {
      // Other hosts that localhost
      nvoTxt = '<blink><font size=\'54\' color=\'yellow\'>' + txt + '</font></blink>' ;
      // Localhost
      nvoTxt = '<font size=\'6\' color=\'green\'>' + txt + '</font>' ;
    tag.innerHTML = nvoTxt; 
Un petit copier/coller, une adaptation pour les IP/noms de serveurs, et c'est fini : vous voila avec un joli nom de serveur géant ET qui clignote.

mercredi 8 avril 2009

Excitant ! (pour les neurones)

Ah ah, enfin !

Aujourd'hui, de bonnes nouvelles sont arrivées pour qui code en Java dans le web.

Notre grand frère préféré, Google annonce aujourd'hui:

  • Disponibilité de GWT 1.6
  • Support de Java dans App Engine (beta)
  • Plugin Eclipse dédié facilitant les développements en GWT pour App Engine.

Je n'avais déja pas le temps de faire une version GWT connectée à la base MySQL par du XML/JSON généré en PHP ... Me voila à rêver d'une version App Engine de mon site de contrepeteries.

Je pense que je vais ouvrir une souscription pour me faire offrir un portable pour développer cette nouvelle version.

Est-ce que le quota de 5 millions de pages vues par mois sera suffisant ??

Et est-ce qu'il y a support de smartGWT ?

mardi 24 mars 2009

J'y serais

J'y serais, le 31 uniquement aux ateliers/conférences Sun autour de GlassFish.

mercredi 18 mars 2009

Mes impressions sur SmartGWT 1.0beta2

En résumé, avec cette béta2, j'ai des problèmes de dimensionnement des éléments.

Avant cela, j'ai découvert des problèmes d'interopérabilité avec les composants GWT. Le principe a retenir est qu'il vaut mieux éviter de mélanger les composants GWT et SmartGWT, sauf à rester dans le même cadre que l'intégration présentée dans le showcase (du GWT contenu dans du SmartGWT) et surtout pas l'opposé.

Ce qui est décevant, c'est la perte de fluidité à l'utilisation par rapport au GWT basique. Toutes ces lignes de codes pour valoriser les hauteurs et largeurs des composants

L'aspect positif de cette librairie est qu'elle est plus riche, beaucoup plus riche que le GWT basique. On a ENFIN un composant de tableau présentable. On peut passer deux minutes à lire les propositions d'auto-complétion sous Eclipse.

La version finale corrigera on l'espère les défauts actuels