Issue Details (XML | Word | Printable)

Key: MULE-2308
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andreas Guenther
Reporter: Andreas Guenther
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

Mule bootstrap code refactoring (was license refactoring)

Created: 11/Sep/07 06:16 PM   Updated: 19/Sep/07 11:49 PM
Component/s: Core: Bootstrap / Java Service Wrapper
Affects Version/s: 1.4.2
Fix Version/s: 1.4.4, 2.0.0-M2

Time Tracking:
Not Specified

Issue Links:
Block
 

Labels:
User impact: Low


 Description  « Hide
The LicenseHandler.java class has lots of responsibilities which can be re-factored out into util classes. As it turns out, there's more that can and needs to be done based on feedback on my first commit.

 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Andreas Guenther added a comment - 11/Sep/07 06:46 PM
Committed changes as r8342

>>>
License code refactoring, mainly moving code out into separate util classes. These util classes should eventually go into the core. I tested these changes with JRockit 5.0 and SunJDK1.4.2.


Andrew Perepelytsya added a comment - 11/Sep/07 07:02 PM
Andreas, could you also test the JRockit 5/Linux combination (or was it on linux initially in your case?

Also, check my code review questions in the dev list, please.


Andreas Guenther added a comment - 11/Sep/07 08:12 PM
Yes, this was tested on Fedora 7 using JRockit.. I'll take a look at the dev comments.

Holger Hoffstaette added a comment - 12/Sep/07 04:01 AM
module-boot should not depend on core and currently does not - classpath implications.

Andreas Guenther added a comment - 12/Sep/07 12:32 PM
Holger,

Can you please be more specific on why module-boot shouldn't depend on core? I don't understand the classpath implications you are referring to. Besides, module-boot currently does depend on core. Just take a look at ModuleBootstrap.java and ReflectionHelper.java. Unless you don't count core imports as dependencies

-Andreas


Holger Hoffstaette added a comment - 13/Sep/07 07:14 AM
I only looked at the immediate dependencies and core wasn't in there (which just proves that implicit dependencies via the parent pom are evil..Dirk is removing them as we speak). As for the dependency itself, all I know is that when the boot module was created, we tried to avoid the dependency on core for some important reasons. Might have been classpath trouble, might have been cyclic build problem - I don't know since I didn't write any of that.
On the other hand as a general rule core should not become a dumping ground for code that is only used once. Over the last year we have tried very hard to reduce unnecessary coupling across all modules.

Andreas Guenther added a comment - 13/Sep/07 02:30 PM
Changed summary and description to reflect reality on what's being worked on now.

Marie Claire Rizzo added a comment - 19/Sep/07 05:25 AM
Hi Andreas

I was seeing the changes you made to the LicenseHandler and there is a problem with its usage with the GUI Installer. The problem is that due to a limitation in the installer we are currently using, we can't execute a class that uses other jar files.... meaning that the usage of the commons logging will blow everything up in the GUI Installer. Is there anything you can do about this?


Andreas Guenther added a comment - 19/Sep/07 10:15 AM
Marie,

Yes, I am aware of this and took this into account. I even have a patch for the GUI installer to address that, which actually is a bug I will commit my work today and you may review it, too. In addition I will update the GUI Installer page with instructions on how to apply the patch before building the installer. I was dragged into other work and couldn't continue working on this issue until today. Furthermore, I wanted to align with the 2.x work to make a merge easier.

Thanks for pointing this out, though.

-Andreas


Andreas Guenther added a comment - 19/Sep/07 10:18 PM
Committed changes in two parts to make upcoming 2.x port a bit easier:

r8501
Refactoring part 1/2

  • Moved common utility classes from boot module into core.
  • Incorporated Andrew P's suggestions on util classes and naming.

r8502
Refactoring part 2/2

  • Refactored common functionality from GUI and command line implementations into MuleBootstrapUtil.
  • Removed JRocket workarounds where possible.
  • Added logging in various areas, mostly in exception handling where we not really want to annoy the user but still be able to eventually debug.
  • Updated GUI installer to handle refactored licensing with more class dependencies than itself. See also updated README.txt in project folder.
  • Changed the GUI installer README to point to WIKI instead of actually describing it.
  • Gracefully exist when license agreement is denied instead of showing stacktrace.

Andreas Guenther added a comment - 19/Sep/07 10:50 PM
Ported first part r8501 to 2.x, committed as r8504.

Andreas Guenther added a comment - 19/Sep/07 11:26 PM
Comitted 2nd part from r8502 to 2.x as r8505. Note that this was not an actual merge because of the difference on how this needed to be ported to 2.x.

Andreas Guenther added a comment - 19/Sep/07 11:27 PM
Tested against Sun's VM and BEA's JRockit.