Thanx for the comments.
I am afraid the type of connection does not make any difference, cause i am not available to get a datasource at container startup at all.
Therefore it perfectly works to a later point in time i assume this is unavoidable.
But maybe i am totally wrong and the code:
com.sun.appserv.jdbc.DataSource ds=
(com.sun.appserv.jdbc.DataSource)context.lookup("dataSource");
should also work for realms in the init phase (glassfish startup). If so, which context should I use? Neither with javax.naming.InitialContext nor with ConnectorRuntime.getRuntime() a JNDI Lookup works.
Did i get something wrong?
[Message sent by forum member 'tomiko' (tomiko)]
http://forums.java.net/jive/thread.jspa?messageID=353368