Oliver,
I notice that some methods in AbstractRDBMSStore such as retrieveObject() has
the code as you mentioned below.
> > 20 Feb 2004 14:48:47 - WARNING - WARNING: No active transaction
> > Thread-6, 20-Feb-2004 14:48:47, patrick, GET, 500 "Internal Server
> > Error", 50 ms, /files
>
> As far as I remember no transaction is started for a GET. There are
> other methods you will not need a transaction for. That's why
> I open a
> temporary connection when there is no active transaction and thus no
> connection associated to it. The code looks like:
>
> if (getActiveTransactionContext() == null) {
> Connection connection = null;
> try {
> connection = getNewConnection();
> return adapter.retrieveObject(connection, uri);
> } catch (SQLException e) {
> throw new ServiceAccessException(this, e);
> } finally {
> if (connection != null) {
> try {
> connection.close();
> } catch (SQLException e) {
> getLogger().log(e, LOG_CHANNEL,
> Logger.WARNING);
> }
> }
> }
> } else {
> return
> adapter.retrieveObject(getCurrentConnection(), uri);
> }
>
> This works fine with Slide's internal JTA implementaion, but
> I have no
> idea what about Tyrex or other implementations more compliant to the
> spec. Would be interesting to find out though...
>
I wonder why it isn't done in all other methods. I ran into
NullPointerException due to No active transaction when grantPermission() is
called.
27 Feb 2004 15:55:58 - WARNING - WARNING: No active transaction 27 Feb 2004
15:55:58 - org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - Getting current
connection for thread Thread[main,5,main] 27 Feb 2004 15:55:58 -
org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - No id for current thread -
called outside transaction? 27 Feb 2004 15:55:58 -
org.apache.slide.common.SlideException - DEBUG -
org.apache.slide.common.ServiceAccessException: Service
[EMAIL PROTECTED] access error :
java.lang.NullPointerException at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.grantPermission(StandardR
DBMSAdapter.java:534) at
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.grantPermission(AbstractRDB
MSStore.java:501) at
org.apache.slide.store.AbstractStore.grantPermission(AbstractStore.java:622)
at org.apache.slide.store.ExtendedStore.grantPermission(ExtendedStore.java:476)
at org.apache.slide.security.SecurityImpl.grantPermission(SecurityImpl.java:239)
Regards,
Willie Vu
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]