Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] IAppExtension to configure default CDOResourceNodes
[CDO] IAppExtension to configure default CDOResourceNodes [message #1713855] Sat, 07 November 2015 08:26 Go to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
HI,
I would like to implement an IAppExtension that configures a repository with some default CDOResourceNodes (Folders plus some real Resources). I am also making use of a security manager.
First thing I have done is implementing a mechanism to start the extensions in a well defined order.

Now I have two options.
1. Start my own Extension before the SecurityManager
2. Start my own Extension after the SecurityManager

This are my experiences:

1. Start before the SecurityManager
I use a jvm connector to get a session and transaction for the creation of my resources. Resources get created without any problem.
When the security manager comes up it does not recognize that there are resources which have not yet been properly configured for security.

2. Start after the SecurityManager
I am using a jvm connector to get a session and transaction just like it is done in the security manager. Execution of my Extension causes (randomly but very often) ConflictCommitExceptions. From the logging I can see that inserts into the DB are fired by the security manager. From what I can tell these inserts come asynchronously.

Question:
Is there a best practice to achieve an initial configuration? I would prefer installation of the resources before the security manager comes up (approach 1.) because that way I do not need credentials. Following this approach I would somehow need to let the security manager configure the existing resources after it has come up.
If I follow approach 2., are there any sync issues which I might be missing here?

Thanks in advance

Regards,
Thorsten
Re: [CDO] IAppExtension to configure default CDOResourceNodes [message #1713857 is a reply to message #1713855] Sat, 07 November 2015 09:01 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 07.11.2015 um 09:26 schrieb Thorsten Schlathölter:
> HI,
> I would like to implement an IAppExtension that configures a repository with some default CDOResourceNodes (Folders
> plus some real Resources). I am also making use of a security manager. First thing I have done is implementing a
> mechanism to start the extensions in a well defined order.
That sounds interesting. Does that involve changes in CDO? If so, would you be willing to contribute them?

> Now I have two options. 1. Start my own Extension before the SecurityManager 2. Start my own Extension after the
> SecurityManager
> This are my experiences:
>
> 1. Start before the SecurityManager
> I use a jvm connector to get a session and transaction for the creation of my resources. Resources get created without
> any problem. When the security manager comes up it does not recognize that there are resources which have not yet been
> properly configured for security.
I'm struggling a bit to see what "not yet been properly configured for security" means. What's the concrete effect in
this case?

> 2. Start after the SecurityManager
> I am using a jvm connector to get a session and transaction just like it is done in the security manager. Execution of
> my Extension causes (randomly but very often) ConflictCommitExceptions. From the logging I can see that inserts into
> the DB are fired by the security manager. From what I can tell these inserts come asynchronously.
You mean asynchronous to the start() methods of the IAppExtensions? That would surprise me and I couldn't find code that
would back up this theory. It would help if you told what exact SQL statements you saw and what threads were all involved.

> Question:
> Is there a best practice to achieve an initial configuration? I would prefer installation of the resources before the
> security manager comes up (approach 1.) because that way I do not need credentials. Following this approach I would
> somehow need to let the security manager configure the existing resources after it has come up.
> If I follow approach 2., are there any sync issues which I might be missing here?
I'm not aware of any.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] IAppExtension to configure default CDOResourceNodes [message #1713880 is a reply to message #1713857] Sat, 07 November 2015 12:55 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
I use my own implementation of CDOServerApplication and I have simply added an interface which is implemented by my Extensions in order to get them in a well defined order. Start of extensions with these interfaces is postponed with respect to the original cdo extensions. One proper solution would be to extend the ExtensionPoint by a priority attribute. If I find some time I could contribute something like this.

With respect to the original problem I have indeed forgotten to give all of the required information.

I have an own implementation of a SecurityManager which takes care of password encryption. In addition it is capable to install a standard security realm with users and roles preconfigured. So whenever I setup a new repository the SecurityManager configures it with these users respectively.

Now when I install the CDOResources first, the SecurityManager which drops in after the installation does not recognize that there are already CDOResources which need to be configured for authorization. As a result I do not see any of the predefined resources when I log in with one of the users. I did not get into this very deeply because I thought that the reason is the missing authorization information in the repository.
When I install the CDOResources after the SecurityManager I have the following log which I can provide:

!MESSAGE Security extension started
12:16:14,342 INFO  [RepositoryConfigurator] RepositoryConfiguration starting
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_COMMIT_INFOS(COMMIT_TIME, PREVIOUS_TIME, BRANCH_ID, USER_ID, COMMIT_COMMENT) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=0]
12:16:14,483 DEBUG [RepositoryConfigurator]  -- Creating project folder
12:16:14,484 DEBUG [RepositoryConfigurator] Creating resource folder $projects
12:16:14,493 DEBUG [RepositoryConfigurator]  -- Creating catalog folders
12:16:14,494 DEBUG [RepositoryConfigurator] Creating resource folder $catalogs
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?), probability=MAX, touch=4652]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE(CDO_ID, CDO_VERSION, CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, ID, ANNOTATIONS, PERMISSIONS, ASSIGNEES) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4541]
12:16:14,495 DEBUG [RepositoryConfigurator] Creating resource folder $system
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_PERMISSIONS_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4543]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_PERMISSIONS_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4662]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4544]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4664]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4665]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4666]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4667]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4668]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4669]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4670]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4671]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4672]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4673]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?), probability=MAX, touch=4660]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION(CDO_ID, CDO_VERSION, CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, ROLE0, ACCESS, FILTERS) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4551]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION_FILTERS_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4552]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?), probability=MAX, touch=4675]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_RESOURCEFILTER(CDO_ID, CDO_VERSION, CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, PATH0, PATTERNSTYLE, FOLDERS, TEXTRESOURCES, BINARYRESOURCES, MODELRESOURCES, MODELOBJECTS, INCLUDEPARENTS, INCLUDEROOT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4554]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?), probability=MAX, touch=4678]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION(CDO_ID, CDO_VERSION, CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, ROLE0, ACCESS, FILTERS) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4676]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION_FILTERS_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4677]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?), probability=MAX, touch=4680]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_RESOURCEFILTER(CDO_ID, CDO_VERSION, CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, PATH0, PATTERNSTYLE, FOLDERS, TEXTRESOURCES, BINARYRESOURCES, MODELRESOURCES, MODELOBJECTS, INCLUDEPARENTS, INCLUDEROOT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4679]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?), probability=MAX, touch=4683]
12:16:14,496 DEBUG [RepositoryConfigurator] Creating resource folder $public
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER(CDO_ID, CDO_VERSION, CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, FOLDER, NAME, NODES) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=0]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=0]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4689]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4690]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4691]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4692]
net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE, CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?,  ?, ?), probability=HIGH, touch=4693]
net4j-thread-98


From the log it becomes visible that the security manager inserts into some security tables (SECURITY_USER_ROLES_LIST, etc.). At the same time my extension creates some folders $catalog (etc.). In this situation I typically get a commit exception. The processes run asynchronously (note that the "Creating resource folder" and "sql=INSERT INTO SECURITY_...." logs are mixed). If I place a breakpoint in my appExtension and wait until the security manager has inserted all its data. Everything is fine.


Regards,
Thorsten
Re: [CDO] IAppExtension to configure default CDOResourceNodes [message #1713889 is a reply to message #1713880] Sat, 07 November 2015 14:43 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 07.11.2015 um 13:55 schrieb Thorsten Schlathölter:
> I use my own implementation of CDOServerApplication and I have simply added an interface which is implemented by my
> Extensions in order to get them in a well defined order. Start of extensions with these interfaces is postponed with
> respect to the original cdo extensions. One proper solution would be to extend the ExtensionPoint by a priority
> attribute.
Or add proper IDs and lists of dependencies to the markup such that a partial order can be computed from that.

> If I find some time I could contribute something like this.
That would be great ;-)

>
> With respect to the original problem I have indeed forgotten to give all of the required information.
>
> I have an own implementation of a SecurityManager which takes care of password encryption. In addition it is capable
> to install a standard security realm with users and roles preconfigured. So whenever I setup a new repository the
> SecurityManager configures it with these users respectively.
And you're sure that you didn't add the asynchronicity in there?

>
> Now when I install the CDOResources first, the SecurityManager which drops in after the installation does not
> recognize that there are already CDOResources which need to be configured for authorization. As a result I do not see
> any of the predefined resources when I log in with one of the users. I did not get into this very deeply because I
> thought that the reason is the missing authorization information in the repository.
I still don't fully understand why the order of resource and security initialization matters in your case. I suspect it
must be related to the way you specify your permissions.

> When I install the CDOResources after the SecurityManager I have the following log which I can provide:
>
>
> !MESSAGE Security extension started
> 12:16:14,342 INFO [RepositoryConfigurator] RepositoryConfiguration starting
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_COMMIT_INFOS(COMMIT_TIME, PREVIOUS_TIME, BRANCH_ID,
> USER_ID, COMMIT_COMMENT) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=0]
> 12:16:14,483 DEBUG [RepositoryConfigurator] -- Creating project folder
> 12:16:14,484 DEBUG [RepositoryConfigurator] Creating resource folder $projects
> 12:16:14,493 DEBUG [RepositoryConfigurator] -- Creating catalog folders
> 12:16:14,494 DEBUG [RepositoryConfigurator] Creating resource folder $catalogs
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?,
> ?), probability=MAX, touch=4652]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE(CDO_ID, CDO_VERSION, CDO_BRANCH,
> CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, ID, ANNOTATIONS, PERMISSIONS, ASSIGNEES) VALUES
> (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4541]
> 12:16:14,495 DEBUG [RepositoryConfigurator] Creating resource folder $system
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_PERMISSIONS_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4543]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_PERMISSIONS_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4662]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4544]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4664]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4665]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4666]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4667]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4668]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4669]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4670]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4671]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4672]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_ROLE_ASSIGNEES_LIST(CDO_SOURCE, CDO_BRANCH,
> CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4673]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?,
> ?), probability=MAX, touch=4660]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION(CDO_ID, CDO_VERSION,
> CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, ROLE0, ACCESS, FILTERS) VALUES (?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4551]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION_FILTERS_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4552]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?,
> ?), probability=MAX, touch=4675]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_RESOURCEFILTER(CDO_ID, CDO_VERSION, CDO_BRANCH,
> CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, PATH0, PATTERNSTYLE, FOLDERS, TEXTRESOURCES,
> BINARYRESOURCES, MODELRESOURCES, MODELOBJECTS, INCLUDEPARENTS, INCLUDEROOT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4554]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?,
> ?), probability=MAX, touch=4678]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION(CDO_ID, CDO_VERSION,
> CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, ROLE0, ACCESS, FILTERS) VALUES (?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4676]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_FILTERPERMISSION_FILTERS_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4677]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?,
> ?), probability=MAX, touch=4680]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO SECURITY_RESOURCEFILTER(CDO_ID, CDO_VERSION, CDO_BRANCH,
> CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, PATH0, PATTERNSTYLE, FOLDERS, TEXTRESOURCES,
> BINARYRESOURCES, MODELRESOURCES, MODELOBJECTS, INCLUDEPARENTS, INCLUDEROOT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?), probability=HIGH, touch=4679]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?,
> ?), probability=MAX, touch=4683]
> 12:16:14,496 DEBUG [RepositoryConfigurator] Creating resource folder $public
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER(CDO_ID, CDO_VERSION,
> CDO_BRANCH, CDO_CREATED, CDO_REVISED, CDO_RESOURCE, CDO_CONTAINER, CDO_FEATURE, FOLDER, NAME, NODES) VALUES (?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?), probability=HIGH, touch=0]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=0]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4689]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4690]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4691]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4692]
> net4j-thread-98 [debug.sql] PreparedStatement[sql=INSERT INTO ERESOURCE_CDORESOURCEFOLDER_NODES_LIST(CDO_SOURCE,
> CDO_BRANCH, CDO_VERSION, CDO_IDX, CDO_VALUE) VALUES (?, ?, ?, ?, ?), probability=HIGH, touch=4693]
> net4j-thread-98
>
>
> From the log it becomes visible that the security manager inserts into some security tables (SECURITY_USER_ROLES_LIST,
> etc.). At the same time my extension creates some folders $catalog (etc.).
Of course there are two threads involved, the main thread (embedded CDO client) that calls transaction.commit() and one
that works directly with the DB (CDO server). But I would expect that the call to transaction.commit() blocks until the
server thread is completely done. This is hard to see from the log

> In this situation I typically get a commit exception. The processes run asynchronously (note that the "Creating
> resource folder" and "sql=INSERT INTO SECURITY_...." logs are mixed). If I place a breakpoint in my appExtension and
> wait until the security manager has inserted all its data. Everything is fine.
I looked at our SecurityManager code and couldn't see that asynchronous commits happen there. It calls commit() only in
two places and both are not using threads, executors or jobs. I fear only deeper debug analysis will solve this miracle ;-(

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] IAppExtension to configure default CDOResourceNodes [message #1713895 is a reply to message #1713889] Sat, 07 November 2015 16:38 Go to previous message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi,
thanks for your help. I have had an error in my thinking with respect to the issue of starting the security manager after installing the initial Resources. I was looking for resources which I had removed from my initial config Sad.

Since this is my preferred solution anyway, I will go with this. The async problem thus stays unresolved.

Thank you very much for helping out at the weekend!

Regards,
Thorsten
Previous Topic:binding ZK with EMF
Next Topic:Save option OPTION_ROOT_OBJECTS ignored with OPTION_BINARY
Goto Forum:
  


Current Time: Thu Apr 25 05:59:44 GMT 2024

Powered by FUDForum. Page generated in 0.02665 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top