I found out that the problem could be solved with some small programming in GenIC
("small" for the initial developer of
GenIC...). GenIC may not produce code that does casting, but has to produce code that
does correct processing of the types if
the used types are java.lang wrappers. For examples:
What GenIC 2.2.6 does at the moment is:
.setObject(x, (java.lang.Object) y)
and what it has to do is
.setShort(x, y.shortValue())
in the case of ejbStore, and instead of
= (java.lang.Short)rs.getObject(z)
it has to do
= new java.lang.Short(rs.getShort(z))
in case of ejbLoad.
This should be no big problem to do and for this has to be only done when the classes
are known java.lang wrapper classes
(for all others the current method is all right I think), there should be no
interference with other DBMS etc. This means,
this change would help to solve problems without making problems, so I would please
that a developer that is familiar with
the internal structure of GenIC, to do this changes.
It is quite clear that a correct work with types - as long as they are known - is the
better and safer way agains simple
casting that - in my case - can produce errors.
Thank you
Markus