Good article about WeakHashMap:
http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html
What to Do When Your Goals Don’t Work
8 hours ago
A blog about technical and cultural experiences to be shared with everyone.
This is a personal web page. Things said here do not represent the position of my employer.
MixedParamUrlCodingStrategy mypageURL = new MixedParamUrlCodingStrategy(
"/service/test",
MyPage.class,
new String[]{"type"}
);
mount(mypageURL);
form.add(new SubmitLink("update") {
@Override
public void onSubmit() {
PageParameters parameters = new PageParameters();
parameters.add("period", Integer.toString(getPeriod()));
parameters.add("unit", getUnit().toString());
parameters.add("type", getType());
setResponsePage(getPage().getClass(), parameters);
}
});
https://localhost:5443/application/service/test/app/?unit=HOUR&period=6
MyServicePort port = mws.getMyServicePort();
BindingProvider bp = (BindingProvider) port;
bp.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
DEFAULT_WS_URL);
Binding binding = bp.getBinding();
// Add the logging handler
List handlerList = binding.getHandlerChain();
if (handlerList == null) {
handlerList = new ArrayList();
binding.setHandlerChain(handlerList);
}
handlerList.add(handler);
public class SOAPAttachmentHandler
implements SOAPHandler<SOAPMessageContext> {
private Collection<Attachment> attachments;
@Override
public boolean handleFault(SOAPMessageContext context) {
context.getMessage();
return true;
}
@Override
public boolean handleMessage(SOAPMessageContext context) {
attachments = ((SOAPMessageContextImpl)context).
getWrappedMessage().getAttachments();
return true;
}
@Override
public Set<QName> getHeaders() {
return null;
}
@Override
public void close(MessageContext context) {
// blank
}
public Collection<Attachment> getAttachments() {
return attachments;
}
mvn hpi:createThis creates a plugin skeleton through the maven-hpi-plugin. As of this writing, the latest version (1.34) generates a code that uses adeprecated way of doing so, and it is the skeleton of a Builder plugin.


public class DistributedTestRecorder extends Recorder {
public static String DISPLAY_NAME = "Distributed Test Report";
private final String report;
@DataBoundConstructor
public DistributedTestRecorder(String report) {
this.report = report;
}
public String getReport() {
return report;
}
public boolean perform(AbstractBuild build, Launcher launcher,
BuildListener listener) {
return true;
}
@Extension
public static final class DescriptorImpl extends
BuildStepDescriptor<publisher> {
@Override
public String getDisplayName() {
return "Publish " + DistributedTestRecorder.DISPLAY_NAME;
}
public void doCheck(StaplerRequest res, StaplerResponse rsp)
throws IOException, ServletException {
new FormFieldValidator.WorkspaceDirectory(res, rsp).process();
}
@Override
public boolean isApplicable(Class arg0) {
return true;
}
}
}2. Jelly file with the code for our Post-Build action<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"3. HTML code for help files
xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:bh="/lib/health">
<f:entry title="Distributed Test Report pattern" field="report"
description="
This is a file name pattern that can be used to locate the Distributed Test report files
(for example <b>**/performance/perf*</b>).<br/>
The path is relative to <a href='ws/'>the module root</a> unless
you are using Subversion as SCM and have configured multiple modules, in which case it is
relative to the workspace root.<br/>
">
<f:textbox />
</f:entry>
</j:jelly>
<div>Yes, that's all for now. You should already have a post-build action being displayed when you launch Hudson (remember to use "mvn hpi:run" to run Hudson and do not run "mvn package" before that).
This is the distributed test plugin help to be added later.
</div>
There's been a lot of talk over the past few years that perhaps Interface 21 should push to formally make the Spring Framework a part of the JEE specs -- it seemed like it might be possible with Rod Johnson officially declaring his support for JEE 6... well it looks like "Crazy" Bob Lee and the team behind Guice may have found a back door to get themselves into the party first -- according to a new series of articles about the upcoming Web Beans, the new spec is actually influenced by a combination of Seam and Guice ... I find these articles interesting in that Google has apparently taken the JBoss approach to supporting the JCP -- that is, create an independent product to fill a whole in the JEE specs, and then use the JCP to make that product into a spec itself (take a look at the JPA for a previous example)...