Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » DTP Init Not Thread Safe
DTP Init Not Thread Safe [message #445493] Fri, 31 July 2009 19:34 Go to next message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
Member
Is DTP to be considered Thread safe?

I have run across a problem when multiple threads at startup.

I believe the problem is within
org.eclipse.datatools.connectivity.internal.ConnectionProfil eManager.processExtensions

because the error I am getting is an Assertion failure on multiple
definitions of an attribute.

In my code I am calling
IConnectionProfile.createConnection(ConnectionProfileConstan ts.PING_FACTORY_ID)
and getting those assertion errors.
Re: DTP Init Not Thread Safe [message #446454 is a reply to message #445493] Fri, 31 July 2009 22:11 Go to previous messageGo to next message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 495
Registered: July 2009
Senior Member
Erik wrote:
> Is DTP to be considered Thread safe?
> I have run across a problem when multiple threads at startup.
>
> I believe the problem is within
> org.eclipse.datatools.connectivity.internal.ConnectionProfil eManager.processExtensions
>
>
> because the error I am getting is an Assertion failure on multiple
> definitions of an attribute.
>
> In my code I am calling
> IConnectionProfile.createConnection(ConnectionProfileConstan ts.PING_FACTORY_ID)
>
> and getting those assertion errors.
>
We have dealt with a few of the thread safety issues in the past, but I
think we're pretty good at this point. Do you have some context for this
issue? You're calling this in an RCP app?
Re: DTP Init Not Thread Safe [message #480404 is a reply to message #446454] Sun, 16 August 2009 21:06 Go to previous messageGo to next message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
Member
Here is some example code. I run this within a RCP application and it is run simultaneously within two seperate Jobs.

With the synchronized block this works fine. Without it it sometimes doesn't.

ProfileManager profileManager = ProfileManager.getInstance();
synchronized (profileManager) {
if (this.profile != null) {
profileManager.deleteProfile(this.profile);
}
this.profile = profileManager.getProfileByName(profileName);
if (this.profile == null) {
this.profile = null;
profileManager.createProfile(profileName, description, providerId, props);
}
}

I believe the problem lies within the initial Init of the profile manager when you build up all the initial drivers and profiles based off of the DTP extension points.

I am seeing this problem within DTP 1.6 and believe I even saw it within 1.7 but haven't done extensive testing on 1.7
Re: DTP Init Not Thread Safe [message #596241 is a reply to message #445493] Fri, 31 July 2009 22:11 Go to previous messageGo to next message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 495
Registered: July 2009
Senior Member
Erik wrote:
> Is DTP to be considered Thread safe?
> I have run across a problem when multiple threads at startup.
>
> I believe the problem is within
> org.eclipse.datatools.connectivity.internal.ConnectionProfil eManager.processExtensions
>
>
> because the error I am getting is an Assertion failure on multiple
> definitions of an attribute.
>
> In my code I am calling
> IConnectionProfile.createConnection(ConnectionProfileConstan ts.PING_FACTORY_ID)
>
> and getting those assertion errors.
>
We have dealt with a few of the thread safety issues in the past, but I
think we're pretty good at this point. Do you have some context for this
issue? You're calling this in an RCP app?
Re: DTP Init Not Thread Safe [message #596331 is a reply to message #446454] Sun, 16 August 2009 21:06 Go to previous message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
Member
Here is some example code. I run this within a RCP application and it is run simultaneously within two seperate Jobs.

With the synchronized block this works fine. Without it it sometimes doesn't.

ProfileManager profileManager = ProfileManager.getInstance();
synchronized (profileManager) {
if (this.profile != null) {
profileManager.deleteProfile(this.profile);
}
this.profile = profileManager.getProfileByName(profileName);
if (this.profile == null) {
this.profile = null;
profileManager.createProfile(profileName, description, providerId, props);
}
}

I believe the problem lies within the initial Init of the profile manager when you build up all the initial drivers and profiles based off of the DTP extension points.

I am seeing this problem within DTP 1.6 and believe I even saw it within 1.7 but haven't done extensive testing on 1.7
Previous Topic:Missing Dependency
Next Topic:500 row limit on Edit Table?
Goto Forum:
  


Current Time: Sat Dec 20 13:09:22 GMT 2014

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

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