Hi Oliver,

I have done a little digging and I think I have eliminated transaction management as the cause. Here is what I did.

1) Changed over to the straight JDBC version using the SQL Server adapter (thereby eliminating Tyrex from the equation).
2) Closed browser and logged in with a NON-SLIDE user
3) Recieved a 500 internal server error, but WITHOUT the warning about transactions.
4) Closed browser and logged in with a Slide user (good 'ol John) and it worked fine. This made me think this might be the original problem.
5) Changed back to the J2EE version using Tyrex and logged in as John - all fine!


Therefore, it appears that the problem is caused by logging into Slide with a user who is in my JDBC realm but NOT in Slide's Domain.xml.

I have noticed that the <auto-create-user> option seems to no longer exist in Slide 2. Is there an equivalent in the new version?

If not, how do I add new users to Slide without editing Domain.xml? It seems the client utility lacks a command for this. Must it be done programmatically?

Sorry to bombard you with questions - however, it might give me the impetus to resurrect the old admin app for user management and migrate it to Struts 1.1...

Cheers,

Patrick



Oliver Zeigermann wrote:

Patrick van Kann wrote:

Hi,

Thanks for the schema However,. I think I may have found a mistake in the documentation for the J2EEstores, and possibly a regression problem in the binary release.

The docs (at http://jakarta.apache.org/slide/howto-j2eestore.html) says to use the following config for the content store

<contentstore classname="slidestore.j2ee.J2EEContentStore">
  <parameter name="datasource">jdbc/CookieslideDS</parameter>
</contentstore>


Yes, you are right. I will fix this...

But this class doesn't exist in the slide-stores2.0b.jar. Instead, I have tried to replace this with:

<contentstore>
 <reference store="nodestore"/>
</contentstore>


Right...

However, I am having trouble to get this to work. This is what happens when I try to access content.

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...

It may be because I am using Tyrex to manage transactions and manage my datasource. However, this exact configuration worked with the CVS version I downloaded in October/November 2003.

It is a regression problem? I seem to recall that the J2EE stores were patched mid-last year because of transaction management problems.


Most likely. I have changed pretty much concerning connections and transaction stuff.

It would be a great help if you could persue this a little bit more and see why this fails. Any ideas?

Oliver



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to