February 2005

Bah!

I finally get around to trying some old keystores from 1.4.x on 1.5.0… guess what: they work. So does every other keystore I have tried, other than the 1.4.2_02 version which is messed up in other ways. I found that Sun got off their butts and fixed bug #4887561

I’m glad I spent a little time (about 3 hours total) figuring out the classloader stuff. That will definetly come in handy down the road. I think I will still need to have the ability to load different keystore types at the same time, if I want to do a conversion program or something, but I think for know I will just leave the code alone and focus on more important functions of JKeyManager, like adding “Create Key” functionality, and Import/Export of keys / certs.

General
Java

Comments (0)

Permalink

JFace rocks

Well, I figured out how to get the buttons to enable or disable according to what the application’s state is (what fields are populated, etc). Thanks entirely to JFace.

I did this by creating an Application state class, which is basically a glorified HashMap that also propagates “state” (property) changes to any registered listeners. Then, for every action that needs to pay attention to a property, I added the JFace’s IPropertyChangeEvent interface and registered them with the ApplicationState object. So, now I have a central place to put and retrieve application data that also propagates all update events. I could see this slowing things down in a larger application with tons of listeners, and I’m not quite sure how Eclipse is doing it, but I like what I have for this application.

ClassLoaders:
I found some thing cool that I didn’t know about ClassLoaders last night. Two different instances of classloaders do not know about classes that were loaded by the other classloader. This is huge, as it gives me the ability to classload the various KeyStoreSPI versions, and using a combination of the Delegate pattern and a generalized Interface, I can access all of the different keystore versions from my program. I will try to put up an example of what I’m talking about in the next few days. This is a really neat thing, and if you develop your code using interfaces (something the Spring Framework prescribes), you can load newer versions WITHOUT restarting… of course, you need a customer ClassLoader Manager that is able to either be informed or go out and check for newer versions, and then load the class using a new ClassLoader and give that to you client objects.

General
Java

Comments (0)

Permalink

JKeyManager prototype

Well, after some work last night and this morning, I have a prototype:
JKeyMan prototype

It looks pretty much like KeyToolGUI so far, but I hope to move further away from that with every piece of added functionality.

I really am starting to like JFaces. It makes the creation of Actions quite a bit easier than standard SWT or Swing. Instead of handling the events yourself, you create a class that extends Action and define the run() method with what you want to happen. Then, you can reuse the actions, so for instance, I am reusing the Open Keystore action for both the toolbar AND the menu. Awesome.

Also, the actions made it pretty easy to genericize the code, so I am loading the menu and toolbar based off of data in the properties file.

However, I am struggling a bit as to how I should get information between the Actions and the main window… Specifically, I am not quite sure how to indicate to each Action when it is enabled or disabled. So, when the program starts up, right now all of the actions are enabled, including the Refresh action. Now, thats not a huge deal, but when I add the Create Key actions, that will be a big deal. I think I can solve this via the Observer pattern and some “event scripting” in Jython or Groovy. Need to prototype it out.

General

Comments (0)

Permalink

Sourceforge Project: jkeyman

Well, JKeyManager is now a project on SourceForge. You can find it here. I am pretty excited about this. I am looking forward to putting a great tool out there, and hope that people will find it usefull.

So, I need to get my ass in gear and get more work done on it. So far I built a simple GUI that was able to load arbitrary keystore and display the contents. This was my first attempt at SWT, so it was pretty much a hack. So, I’m rewriting for clarity and to use more of the JFaces code. So far, I like SWT alot more than Swing - it just seems clearer to me. Especially when you add in JFaces. If Swing had the JFaces equivilent, I probably would not be using SWT. However, I have not seen anything (free) that comes close so for now, I am going to stick with what I have.

I do not plan to do a release until I have at least 80% of keytool’s functionality in the GUI. I hope to have that by the end of February or so. So far, it’s taken slightly longer than I expected, due primarily do to learning the SWT and lack of a good SWT Gui Designer. I need to go back and look at what Eclipse plugins are available again. I really do not want to hand build the dialogs.

General

Comments (0)

Permalink