|
|
|
|
Re: Eclipselink without connection pool [message #390608 is a reply to message #390607] |
Wed, 29 July 2009 13:32 |
|
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.
James : Wiki : Book : Blog : Twitter
|
|
|
Re: Eclipselink without connection pool [message #405802 is a reply to message #390608] |
Thu, 30 July 2009 06:18 |
Thomas Haskes Messages: 147 Registered: July 2009 |
Senior Member |
|
|
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.
>
>
|
|
|
Re: Eclipselink without connection pool [message #413741 is a reply to message #405802] |
Thu, 30 July 2009 09:30 |
Thomas Haskes Messages: 147 Registered: July 2009 |
Senior Member |
|
|
Some more infromation:
I just figured out that setting the role after a rollback again doesnt
help, somehow the role is not associated with the user again, although
setting the role does not cause an error.
Thomas Haskes schrieb:
> 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.
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.12520 seconds