Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » thing, abnormal deletion problem
thing, abnormal deletion problem [message #1718859] Thu, 31 December 2015 09:43 Go to next message
Jongmin Kim is currently offline Jongmin KimFriend
Messages: 11
Registered: May 2015
Junior Member
I would like to discuss the following "unusual thing deletion scenario".

1) I approved a thing.
2) I deleted the same thing.
3) I turned off the power, during the thing deletion.
4) The thing was deleted, but items(are belonged to the thing) was not deleted.
5) I wanted to re-approve the thing, again.
6) Because, the items are remained at a item registry, I can't approve the thing.

If the exception is removed
(at "add method" (AbstractManagedProvider.java)), the upper problem will be solved.

But, If the "add method" is modified like upper,
we can't recognize the "same element add problem" that occur in the normal case.

[Updated on: Thu, 31 December 2015 09:57]

Report message to a moderator

Re: thing, abnormal deletion problem [message #1719494 is a reply to message #1718859] Fri, 08 January 2016 11:28 Go to previous message
Andre Fuechsel is currently offline Andre FuechselFriend
Messages: 28
Registered: December 2015
Junior Member

This is really an "unusual scenario" and one, that corrupts the ESH state. Removing the check, whether the item to be created already exists, is not an option. You may, however, react on the IllegalArgumentException and handle it by "re-wiring" the existing items with your thing. Unfortunately this is an IllegalArgumentException and you cannot distinguish it easily from the other IllegalArgumentException thrown when you try to add a null element. It would be better, if another exception would be thrown here, something like an ElementAlreadyExists exception.

[Updated on: Fri, 08 January 2016 11:29]

Report message to a moderator

Previous Topic:Problem running ESH in eclipse
Next Topic:Modify PaperUI from within Binding
Goto Forum:
  


Current Time: Fri Apr 26 23:24:05 GMT 2024

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

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

Back to the top