[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: Eclipselink without connection pool

Thanks, that worked, I solved the OSGi Problem, too, I must have messed
up something.

But now there is the next strange problem comming along, so I hope I may
bother you again with that.

I now want to give the database user a certain role by setting it after
the creation of the entitymanager like this.

em.getTransaction.begin();
em.createNativeQuery(BEGIN DBMS_SESSION.SET_ROLE('userrole' IDENTIFIED
BY somepassword); END;).executeUpdate();
em.getTransaction.commit();

As there is always an exclusive connection used, I assumed this should
work. The odd thing is that it does in all following transactions that
are ended with commit();

The first transaction that is ended with a call to rollback(), causes
that the role is lost. At that time the entitymanager cannot see any of
the tables anymore to which the role grants access.

Why is that only happening when I do rollback, and not on commit?

Am I missing something?

James schrieb:
> Set the min to 0, not the max.
> 
> There is both a read and write pool (in 2.0 you can configure a single
> pool).
> 
> "eclipselink.jdbc.read-connections.min"="0"
> "eclipselink.jdbc.write-connections.min"="0"
> 
> In code you need to set the default and read connection pools min.
> 
> Not sure on the OSGI issue, perhaps someone else knowledgeable on OSGI
> can answer this.
> 
>