[Design of JBoss Collaboration Server] - Minor Bug in MailboxServiceImpl.java?
by sappenin
Hey All,
Not sure if this is a bug or not, but it seems to be. If forum feedback concurs, I'll create a patch.
In org.jboss.mail.mailbox.MailboxServiceImpl.moveFolder(...) [line 824], there appears to be a minor typo with the moveFolder function.
Below is the current version of the function. 'folder' is the folder to be moved, 'target' is the new parent folder, and name is the name of the folder. The function loads 'folder' by id, then loads the target folder by id. It then (assuming the folder and target aren't the same) removes 'folder' from its parent. Next, it appers to add the target folder (i.e., the new parent) to itself via the call "t.addFolder(t)" ---> I think this is the bug.
| @Tx(TxType.REQUIRED)
| public Folder moveFolder(Folder folder, Folder target, String name) {
| Folder f = session.find(Folder.class, folder.getId());
| Folder t = session.find(Folder.class, target.getId());
| f.setName(name);
| if(folder.getId() != t.getId()) {
| f.getParent().getFolders().remove(f);
| t.addFolder(t);
| f.setParent(t);
| }
| session.persist(f);
| return f;
| }
|
It seems like the last few lines should look like this instead:
| ...
| if(folder.getId() != t.getId()) {
| f.getParent().getFolders().remove(f);
| t.addFolder(f); // ---->> SUBTLE CHANGE HERE
| f.setParent(t);
| }
| ...
|
Thoughts? This is probably not an issue since the webmal doesn't appear to use this function yet, but should be fixed if its a bug.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987716#3987716
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987716
19 years, 4 months
[Design the new POJO MicroContainer] - ControllerStates sequential flow for dependent Contexts ?
by vickyk
I have though of a scenario and wanted to confirm if this is correct ?
Let us consider that I have a contexts as
A,iDOA(I depend on A),aDOM(A depend on Me) .
Let me put few more as
aDOM1,aDOM2,A,iDOA1,iDOA2
Controller States being defned here are as S,S1 and S2.
So when the controller installs the context A with the final state as S2 , dependent contexts of A ie iDOA1 and iDOA2 will first be passed to S2 . Once this is done then only the context A will propagate to S2 state.
So the sequential flow could be like this
| iDOA1------------------->S
| iDOA1---------->S1
| iDOA1---------->S2
| iDOA2---------->S
| iDOA2---------->S1
| iDOA2---------->S2
| A -----------> S
| A ------------> S1
| A ------------------------> S2
|
Or the intermediate contexts installation are as
| iDOA1 ------------------->S
| iDOA2 -------->S
| A-------------->S
| iDOA1 -------->S1
| iDOA2 -------->S1
| A-------------->S1
| iDOA1 -------->S2
| iDOA2 -------->S2
| A------------------------->S2
|
The later one looks correct to me . Meanwhile let me dig the code too .
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987676#3987676
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987676
19 years, 4 months
[Design of JBoss Portal] - Page navigational state update
by julien@jboss.com
Concerning the various issues discussions with respect to the page nav state, there is one possibility that we could examine :
The portal core maintains a copy of the page structure when it is first used which means storing for all windows of a page a copy of the position and the region it belongs.
The consequences are :
1/ if the shared structure is modified then the change is not reflected because the user has a copy of that which is categorized so far more than as a bug than a feature.
2/ the only benefit today is to allows anonymous users to perform drag and drop changes for the duration of the portal session (in which the page nav state is stored so far). We are also inclined to remove that bug/feature.
So we could try to remove the copy mechanism and it seems that it would satisfy to of our needs (although 2 can be achieved without it).
What do you think ? I encourage you to look at the code which does that and provide feedback about it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987606#3987606
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987606
19 years, 4 months