If you need Tibco in your every day work, you should take a look at this reminder of Tibco offers with a schort description

http://javarevisited.blogspot.fr/2010/10/upcoming-tibco-tutorials.html

The menu :

  • 1. Difference between RVD and RVRD.
  • 2. Difference between Tibco EMS and Tibco RV
  • 3. Reliable vs Certified messaging in Tibco RV
  • 4. Publish Subscribe vs Request Reply messaging.
  • 5. Tibco Hawk
  • 6. Using Tibco API in Java
  • 7. Using Tibco API in C++
  • 8.Low level implementation of Tibco
  • 9. Tibco Rendezvous issues
  • 10. Tibco Advisory messages

I have a beginner level at oracle, I can write queries and stored procedure but as in Java I like to know precisely the language and the system I use. In my mission I discovered some noob details about Oracle that I must admit, I did not know.

Select * Paradigm

When I worked with Sybase, SQL Server or MySQL and tried to extract multiple column, I have the habbit to put the most important columns at the beginning of my request such as

Initial request that show me the most important column at first position and all other information (JOB_NAME is only in one table) :

 SQL |  copy code |? 
1
SELECT  JOB_NAME, p.* FROM jobstatetreatments j, prismjobs p WHERE j.job_id = p.job_id AND j.job_id ...

With Oracle, this will not work  :

ORA-00936: expression absente

00936. 00000 -  “missing expression”

…. the solution is to prefix all data, by their table name or aliases

 SQL |  copy code |? 
1
SELECT  p.JOB_NAME, j.*, p.* FROM jobstatetreatments j, prismjobs p WHERE j.job_id = p.job_id ..

I really would like to ask a DBA why Oracle did not provide that easy way to query data.

ORDERBY / ROWNUM Observation

How can you select the highest value? Once again if you try to query Oracle as in regular SQL command you may try this.

Let’s say that we have those values in the table myTable

  • myTable
    • col1
      • 5
      • 7
      • 3
      • 9
      • 10
      • 11

 SQL |  copy code |? 
1
SELECT * FROM myTable WHERE ROWNUM <= 3 ORDER BY col1 DESC;

Result

  • col1
    • 7
    • 5
    • 3

Oracle first treats the rownum criteria to extract values then it sorts the list. So the solution is to separate the order by criteria from the rownum criteria.

 SQL |  copy code |? 
1
SELECT * FROM (SELECT * FROM myTabme ORDER BY col1 DESC) WHERE ROWNUM <= 3;

  • col1
    • 11
    • 10
    • 9

     


You may encounter trouble when comparing double value to string values, when you compare CSV values that are related to the system :   expected (for a US system): 100.50 and actual testing (With a FR system) : 100,50

Java and locale behaviour on Windows

The JVM rely on the Windows locale configuration but it does not rely on advanced configuration or personalization. It means that in our case if you have a French configuration but changes the decimal parameter to use the dot. It would not work with java. You need to change the entire localization option (to English for instance).

I would rather find a solution to specify the locale for all JUnit tests. Sorry! There is no portable way to set the JUnit locale. You must define it specifically.

With Eclipse.

on your JUnit tests launch configuration add to vm args  :

−Duser.language=en

With Maven

1
2
3
4
5
6
7
8
>
    >org.apache.maven.plugins>
    >maven-surefire-plugin>
    >2.9>
    >
        >-Duser.language=en>
    >
>

In this article, I will show you how to quickly implement unit tests with mockito. This is fast and simple.  From its web site : “Mockito library enables mocks creation, verification and stubbing.”. Which means that all underlying external services behaviour can be customized. It’s very easy to create clean and simple unit tests with that framework.

More information at :

This is the configuration I will create and the interface StringConfigService represents the service I want to test :

Spring Mockit Junit Mockito

Continue reading


L’ère des développeurs barbus enfermés dans une pièce noire travaillant seuls est maintenant révolue. Nous travaillons dans une industrie ou nous produisons un produit : notre logiciel. Il est composé de multiples parties – le code source, il est assemblé et testé au moyens de divers outils – IDE, mails, intégration continue et pour faire cela nous utilisons plusieurs systèmes de production – Test Driven Development, Scrum, Lean.

Dans cette optique-là, nous faisons attention à la qualité de notre code source pour que notre produit fini soit de meilleure qualité possible. Pour mesurer la qualité du code nous avons en premier lieu, besoin de créer des indicateurs (nombre de lignes de code, nombre de commentaires, taux de couverture de code. En second lieu, nous avons besoin d’un outil analysant et synthétisant ces indicateurs. Sonar nous permet de faire cela de manière assez intuitive et ergonomique.

Au menu :
  • Sonar
  • La dette technique
  • La méthode SQALE

Continue reading


Cela faisait quelques temps que je n’avais rien publié et pourtant j’ai quelques sujets en réserve… En fait, je m’étais fait piraté mon blog et je n’avais pas le temps de le réparer ni de le mettre à jour.

Il fallait dire aussi que j’utilisais Joomla et que leurs évolution du type “big bang” ne facilite pas les mises à jour.

J’ai donc décidé de passer sur WordPress et je remercie au passage l’auteur de ce plugin (http://wordpress.org/extend/plugins/joomla-15-importer/) qui m’a permis de récupérer TOUT mes posts y compris les images. C’est fantastique.

Donc c’est parti pour un nouveau blog avec le même contenu… :)


You love cygwin but you are not a fan of command line text editor, you would love to have advanced features with a beautiful GUI (search ad replace, monitor, color, etc..).

In short terms, you want to use a windows text editor with cygwin !

How to do it easily :

Update your ./.bashrc file and add this alias

1
alias edit="cygstart /cygdrive/c/apps/Notepad++/notepad++.exe "$(cygpath -w "$1")""
  • cygstart starts the windows programm
  • cygpath transform the uri to a windows path

dont forget to restart cygwin or source your bashrc and here we go!

Have fun!


The trouble is that you want to add a programm to your command line (java for instance) but your are not admin :

Path_Before

You cannot add a system variable but you want to add JAVA_HOME to the path. You cannot use the “Set” command with cmd as it is not persisted.

In fact, the solution is quite easy when you know it! You only need to insert a “Path” variable (Case is important) in your user’s variables :

Path_After

 

And vouuuaaalaaa!

 


Do you know knowledgeblackbelt.com ? 

It is  a community website about java eco system and more, where you can learn, take courses or exam. All of this is performed in a community way. each item (course or exam) cost points and you can earn points by contributing.

How can you do that? You have plenty of ways, you can write exam question, course content or  inserting references from your blog or from anywhere (see the full details of contribution possibilities here).

Of course it cannot replace real experience on project but reviewing technologies and passing exams allows you to keep you memory up to date.

And as I finally have some spare time and I need to refresh my memory, I need you to give me some point by going to see my knowledge black belt profile

Thanks…


A very interesting article about the Automatic Resource Management (ARM) and the AutoCloseable Interface by Sal Pece and Cameron McKenzie.

TheServerSide has been digging into the new Java 7 features, and trying to provide some thorough and informative tutorials on how the various language enhancements introduced in Java 7 work. In this tutorial we expand on our initial look at the new try-with-resources syntax.

   http://www.theserverside.com/news/thread.tss?thread_id=63533