Thread safety with no threads in sight
When people discuss thread safety in code it is almost entirely within the context of threading in a single process. The problems that come up are races conditions, data races, and unseen updates with solutions like locking, synchronized updates and immutability. This definition of thread safety is too focused. Much of the problems normally attributed to thread safety can be seen in programs that have no access to OS threads or are running on multiple servers. ...
Epic google error message fail
I just spent a day without being able to send email because I enabled two factor authentication on my work account. That and a complicated gmail setup that apparently appeals to no one else ;) I forward all my mail from my work, google apps account into my personal gmail account so that all my email is consolidated for reading, filtering, etc. I then use the “Send mail as” functionality to email from my work account. Gmail even allows you to configure alternate SMTP information so that when I send from my work account people don’t get a “Sent on behalf of…” in their Outlook. ...
Connecting to an untrusted certificate in java
I was getting errors(unable to find valid certification path to requested target) in Alfresco trying to connect to LDAP over ssl using an untrusted certificate and found a great hint on the interwebs that I thought I’d share. Most of the hits on google mention this post: http://blogs.sun.com/gc/entry/unable_to_find_valid_certification My only criticism of that article is that it only minimally addresses how to actually use the fixed keystore. I downloaded their source and hacked it up a little change the name of the certificate store from “jssecacerts” into “cacert” which is the default certificate store for all java programs. My goal was to fix the certificate store for the entire machine. ...
Help improve the Kindle reading ecosystem.
I sent this as an email to kindle-feedback but thought I would share it with the interwebs as well. Let me be clear that I am absolutely in love with my Kindle. I used to not particularly enjoy reading but the kindle has changed my opinion in two short weeks. With that said my major sadness about it was access to personal content. Hence this letter: Dear Amazon, Please improve the reading ecosystem represented by the kindle device, and the plethora of applications that also represent “kindle devices” e.g. the iphone, ipad, web, etc. Right now these other devices are treated like second class citizens because there is no way to get personal content onto them and to synchronize the reading of the content. ...
Remap Caps lock on a Macbook Pro
I was fortunate enough to receive a CR-48 from Google last week. My impressions of it are more or less in line with what MG Siegler over at TechCrunch has reported: good battery, nice screen, light weight laptop. The only problem is that I have needed to adjust my workflow when I’m working on my regular computer, a Macbook Pro to facilitate sharing documents between the two machines. For example, I have migrated away from OmniOutliner to a comparable online version, Workflowy. ...
Notes about Alfresco's devcon
Nate McMinn has a brief wrap up of the Alfresco developers convention. I was unable to attend and it sounds like I missed a lot of interesting news. I was excited to here: One upcoming project that was discussed at DevCon is putting together a third-party components catalog for Alfresco. Right now there is nothing like this available. Alfresco community projects are scattered all over the place. Some are in Alfresco Forge, some are on Google Code, still others are on developers’ blogs (mine included). I’m sure I’m forgetting a few locations, but you get the idea. Rolling all of this up in one queryable repository would be a fantastic addition to the Alfresco community. ...
Creating custom JMX MBeans for reporting in Alfresco
JMX rocks. When configuring a server it is a boon to developers. Especially when combined with the Alfresco subsystem architecture. You can interate on changes to the LDAP sync without having to restart the server. JMX also gives savvy system administrators a way to manage and monitor what’s going on within the repository. If you’re still unfamiliar with the basics of JMX, especially within the context of Alfresco, Jarred Ottley over at Alfresco has written a number of excellent tutorials. I’ve added some additional articles and come up with the list below. ...
Using Alfresco for authentication in Spring Surf
Kevin Roast’s blog had a great post about Authentication User’s against an Alfresco Repository. When we first explored Surf, when it starting to get traction in 3.2 or 3.3 our major complaint was that it seemed difficult to actually connect to the repository. I’m glad to see that this has changed. Or that it is now better documented. Technorati Tags: Alfresco
Rapid development in Alfresco Share - the refresh webscript
Zia Consulting develops in Eclipse using a setup different than described by Alfresco. We run an embedded version of Jetty with the Alfresco default WARs. At runtime we mix in changes using extra classpath entries and web overlays. This has many benefits: most importantly that we develop functionality without having to restart the repository. When there is a reason to restart the server we make efforts to fix the problem through programming or configuration. ...
Creating calculated datalist columns in Alfresco Share 3.4b
This is a short one since not much changed. If you didn’t have a chance to read the 3.3 version of this please review it now since I’m not going to post the entire tutorial again. We only need to change the filter and specifically how the dynamic columns are added to the form. public class ProjectStatusFilter extends AbstractFilter { @Override public void afterGenerate(Object item, List fields, List forcedFields, Form form, Map context) { boolean typeDefCorrect = (item instanceof TypeDefinition && ((TypeDefinition) item) .getName().equals(PmoModel.TYPE_PROJECT_STATUS_DL)); boolean nodeRefCorrect = (item instanceof NodeRef && AlfUtil.services() .getNodeService().getType((NodeRef) item).equals( PmoModel.TYPE_PROJECT_STATUS_DL)); if (typeDefCorrect || nodeRefCorrect) { double varianceValue = 0d; double percentComplete = 0d; double percentExpended = 0d; // If this is a node then do the calculations if (nodeRefCorrect) { NodeRef itemNode = (NodeRef) item; /* Some calculations that aren't interesting */ } /* Here are the changes for 3.4b */ form.addField(FieldUtils.makePropertyField(PmoModel.variancePropDef, varianceValue,AlfUtil.services().getNamespaceService())); } } /* Left the other 3 fuctions for completeness */ @Override public void afterPersist(Object item, FormData data, NodeRef persistedObject) {} @Override public void beforeGenerate(Object item, List fields, List forcedFields, Form form, Map context) {} @Override public void beforePersist(Object item, FormData data) {} }