I've found the problem.
When I debug context.lookup() from
DataSource ds = (DataSource)context.lookup("jdbc/RCVCERMAPB/EnregistrementTracesApplicatives");
I get:
MemoryContext{namesToObjects={default=org.postgresql.Driver::::jdbc:postgresql://172.25.94.30:5432/rspdb3::::rcvcermapb_traceappli}, subContexts={}, env={org.osjava.sj.jndi.shared=true, org.osjava.sj.root=src/main/resources/jndi/, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=/, jndi.syntax.separator=/, jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@dbd940d, nameInNamespace=jdbc/RCVCERMAPB/EnregistrementTracesApplicatives, nameLock=true}
The datasource has the name default.
So I need to do a
context.lookup("jdbc/RCVCERMAPB/EnregistrementTracesApplicatives/default")
to get it
or define my datasource in jdbc/RCVCERMAPB/EnregistrementTracesApplicatives.properties
rather than jdbc/RCVCERMAPB/EnregistrementTracesApplicatives/default.properties
It works fine this way.
Thanks to those who read my question and also to the editting by Mark Rotteveel.