<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7542700</id><updated>2011-12-12T12:07:35.776-08:00</updated><category term='SCM'/><category term='RCS'/><category term='transaction'/><category term='java'/><category term='SpringOne'/><category term='google-appengine'/><category term='scea'/><category term='malware'/><category term='JTA'/><category term='tomcat'/><category term='JTS'/><category term='scjp'/><category term='USB'/><category term='stackoverflow'/><category term='jpda'/><category term='amazon-ec2'/><category term='XA'/><category term='Perforce'/><category term='spring'/><category term='killVBS'/><category term='virus'/><category term='TeX'/><category term='vbs'/><category term='vim'/><category term='eclipse'/><category term='scbcd'/><category term='scwcd'/><category term='LaTeX'/><title type='text'>Toolkit's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7542700.post-6620006728486250412</id><published>2009-04-28T12:22:00.001-07:00</published><updated>2009-04-28T13:03:01.170-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google-appengine'/><category scheme='http://www.blogger.com/atom/ns#' term='amazon-ec2'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='SpringOne'/><title type='text'>SpringOne 2009 Amsterdam - Day Two - Keynote</title><content type='html'>Today was another excellent day at SpringOne.&lt;br /&gt;&lt;br /&gt;First up was Adrian Colyer's keynote session. &lt;em&gt;Wow&lt;/em&gt;. Just a few slides, and a bunch of incredible demos of the power of SpringSource Tool Suite!&lt;br /&gt;&lt;br /&gt;Whereas yesterday's demo of &lt;a href="http://www.springsource.org/roo"&gt;roo&lt;/a&gt; had all been about assisting the developer in rapid application development, today's demos concentrated in assitance for the testing and operations teams, in rapid deployment to staging and production environments.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Platform as a Service&lt;/h2&gt;&lt;br /&gt;First up was an example of deploying a web-app to Google AppEngine. First off was an example of local testing, followed by deployment to the cloud for a simple webapp (with a groovlet thrown in for good measure). This was followed by a similar exercise deploying a grails application. Adrian had to make sure to uninstall hibernate (grails uninstall-plugin hibernate) since GAE doesn't support this at the moment, and then install the GAE plugin (grails install-plugin app-engine). Having done this, he quickly created a simple domain class, a controller, and then deployed to the cloud. This is how easy life should be!&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Datacentre as a Service&lt;/h2&gt;&lt;br /&gt;Next up was an example of deploying a dm Server cluster, and a load balancer to Amazon EC2. Again, this was fully integrated within STS. He also showed an interesting website (not part of SpringSource) &lt;a href="http://www.cloudfoundry.com/"&gt;CloudFoundry&lt;/a&gt;, which he used to configure a deployment 'blueprint' (HTTP, dm Server, MySQL), and pass this to EC2. Adrian's vision would be that Spring might support a similar blueprint as a 'deployment context', where 'beans' are individual nodes.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Use your own datacenter as a Service&lt;/h2&gt;&lt;br /&gt;Adrian's tounge in cheek title for simplifying deployment within your own datacenter. This part concentrated on VM's, and used VMWare Lab Manager connected to SpringSource's datacenter in Southampton.&lt;br /&gt;&lt;br /&gt;I'm sure there's a lot of stuff I forgot or misremebered. I will definitely want to watch the presentation again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-6620006728486250412?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/6620006728486250412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=6620006728486250412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/6620006728486250412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/6620006728486250412'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2009/04/springone-2009-amsterdam-day-two.html' title='SpringOne 2009 Amsterdam - Day Two - Keynote'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-7708036977898825365</id><published>2009-04-27T13:20:00.000-07:00</published><updated>2009-04-27T14:12:46.964-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='SpringOne'/><title type='text'>SpringOne 2009 Amsterdam - Day One - Key Note</title><content type='html'>Attended day one of the SpringOne conference in Amsterdam.&lt;br /&gt;&lt;br /&gt;Rod Johnson was up first for the keynote. Obviously the question on everyone's lips is what does the acquisition of Sun by Oracle mean for Java?&lt;br /&gt;&lt;br /&gt;Rod reckons that the JCP process will undoubtably begin to have a bias towards Oracle, to the detriment of IBM. However, he asserts that the key innovations in Java are being made outside of the JCP process (which repeats his statements from the SkillsMatter / QCon conference in London).&lt;br /&gt;&lt;br /&gt;We were then treated to 2 demonstrations.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Roo&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;The first was for a new build assistant, codenamed "roo" demonstrated by Ben Alex. It comes with a nice command line shell, with syntax very similar to Grails, and excellent tab-completion so you don't have to type out verbose options.  It also has excellent support in SpringSource Tool Suite (basically a bespoke version of eclipse - with more complete functionality than the Spring IDE plugins). Forexample, creating an entity was a fairly simple process, resulting in a class that looked something like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;@RooBean // spelling?&lt;br /&gt;@RooToString // spelling?&lt;br /&gt;public class MyEntity {&lt;br /&gt;   @NotNull  // JSR 303 bean validation support&lt;br /&gt;   private String description;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The @Roo annotations are all retention source-code only, so roo does not require any runtime dependencies.&lt;br /&gt;&lt;br /&gt;They key difference with Grails is that Roo uses vanilla Java, and is statically typed.&lt;br /&gt;&lt;br /&gt;The decision matrix for choosing Grails or Roo was presented as:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Do you know Java? If not, use Grails.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Would you prefer static over dynamic typing (or is someone saying you must use static typing)? If yes, then Roo. Otherwise Grails.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;It was impressive. My only concern was with Continuous Integration support. That is, Roo seems to be great within its own shell, or within STS, but what about using Maven / Ant as part of a automated build process. This wasn't really covered. Perhaps the compilation step is simply a @Roo annotation processor step, and there doesn't need to be any fancy maven plugin?&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;SpringSource AMS&lt;/h2&gt;&lt;br /&gt;Next up was the SpringSource Administration Management Suite demonstrated by Jennifer Hickey. The demo had a few hiccups, but the concept was extremely intersting (in fact, I changed which session I attended later just to find our more). Its all about providing the sort of Admin / Monitoring that full-blown appservers have, but on top of Tomcat.&lt;br /&gt;&lt;br /&gt;In fact, its slightly more than that. The idea is that AMS will be able to administer:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;SpringSource tc Server. Spring's tailor-made tomcat server.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Http Server. To configure load balancing etc.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Active MQ message broker.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Operating System - only shown with Linux in the demo.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Also on the roadmap is for AMS to administer groups of SpringSource dm Server nodes (the OSGi'fied web container (tomcat or jetty), with additional OSGi extenders from Spring).&lt;br /&gt;&lt;br /&gt;All in all, a very exciting 2009 for Spring.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-7708036977898825365?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/7708036977898825365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=7708036977898825365' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/7708036977898825365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/7708036977898825365'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2009/04/springone-2009-amsterdam-day-one-key.html' title='SpringOne 2009 Amsterdam - Day One - Key Note'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-4982573386701032387</id><published>2008-10-29T15:31:00.000-07:00</published><updated>2008-10-29T16:28:09.540-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stackoverflow'/><title type='text'>StackOverflow</title><content type='html'>So, a while back, I and about 3000 others volunteered for a private beta of &lt;a href="http://stackoverflow.com/"&gt;StackOverflow&lt;/a&gt;. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A new website for developers to come with their problems / bugs / stacktraces, and ask for advice.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This website comes from Jeff Atwood of &lt;a href="http://www.codinghorror.com/blog/"&gt;Coding Horror&lt;/a&gt; fame, and Joel Spolsky of &lt;a href="http://www.joelonsoftware.com/"&gt;Joel on Software&lt;/a&gt; and &lt;a href="http://www.fogcreek.com/FogBUGZ/"&gt;FogBugz&lt;/a&gt; fame. See the &lt;a href="http://blog.stackoverflow.com/"&gt;StackOverflow Blog&lt;/a&gt; for day to day news on the site.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The private beta finished a while back. I was extremely impressed with the quick response to feedback, and the number of new features continuously being added.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Stackoverflow is quite an interesting social experiment, similar in some aspects to Digg. Interesting questions can be upvoted, and idiotic / spam questions can be downvoted out of existence.  Good answers can also be upvoted. All of these votes count towards a registered user's reputation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As your reputation increases, you gain extra moderator abilities, such as being able to edit other's posts (to tidy up code sections, etc..) or attach searchable tags to questions. Even higher rep allows you to close posts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are, however, some downsides to reputation:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;People started noticing questions like: 'What keyboard do you use' or 'What is your company dress code' would get mega-rep. So some are now trying to think up similar questions to quickly boost their rep. However, the community has  reacted to this, and most questions of this type are either downvoted, or closed.&lt;/li&gt;&lt;li&gt;Some have taken the power to close others questions to extremes, closing questions on a whim, which has annoyed a few people who feel victimised.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Aprt from this, I reckon its a huge success, and will continue to enjoy answering the occasional question I can understand :-)&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-4982573386701032387?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/4982573386701032387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=4982573386701032387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/4982573386701032387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/4982573386701032387'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2008/10/stackoverflow.html' title='StackOverflow'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-8829480118189062745</id><published>2008-06-03T11:11:00.000-07:00</published><updated>2009-02-04T06:14:00.373-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='scbcd'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='scjp'/><category scheme='http://www.blogger.com/atom/ns#' term='scwcd'/><category scheme='http://www.blogger.com/atom/ns#' term='scea'/><title type='text'>Which certification next</title><content type='html'>In its most simple terms, there are two reasons why I have an urge to take certification exams:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To reassure myself that I am not a complete bonehead&lt;/li&gt;&lt;li&gt;To counter my crappy CV writing skills with a list of relevant certifications&lt;/li&gt;&lt;/ul&gt;Previously, I have mainly gone with Sun's certification offerings:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.sun.com/training/certification/java/scjd.xml"&gt;SCJP&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sun.com/training/certification/java/scwcd.xml"&gt;SCWCD&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sun.com/training/certification/java/scbcd.xml"&gt;SCBCD&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sun.com/training/certification/java/scdjws.xml"&gt;SCDJWS &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Now, I was planning on 'completing the set' by taking the &lt;a href="http://www.sun.com/training/certification/java/scea.xml"&gt;SCEA&lt;/a&gt;. However, the amount of momentum with Spring is now picking up at a frightening pace. We are in the golden age with Spring right now. So instead, I've decided to take the &lt;a href="http://www.springsource.com/certification"&gt;SpringSource certification&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As with the SCEA, the SpringSource certification requires a lot more effort (and money) be expended, rather than just turning up and answering a bunch of multiple choice questions.&lt;br /&gt;&lt;br /&gt;Effectively, there are two paths to follow, as quoted from the website:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;A person is eligible for registration if he or she has recently taken the 4-day “CoreSpring” class from SpringSource (or a SpringSource certified training partner in Europe, Africa or the MiddleEast (EMEA)).&lt;br /&gt;&lt;br /&gt;A person may also be eligible for registration, without attending the 4-day course, if he or she can demonstrate having significantly contributed to the Spring community or can provide a reference to a Spring development effort in which he or she was actively involved. This person is referred to as a “grandfathered” candidate.&lt;/blockquote&gt;&lt;br /&gt;As I've managed to convince my company to pay for a bunch of us to attend this CoreSpring class, I will be opting for the first approach.&lt;br /&gt;&lt;br /&gt;I would be interested to know what other people feel on the subject.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Update: Passed the SpringSource certification.... Woo Hoo!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-8829480118189062745?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/8829480118189062745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=8829480118189062745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/8829480118189062745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/8829480118189062745'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2008/06/which-certification-next.html' title='Which certification next'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-3323451528266356513</id><published>2008-04-22T09:36:00.000-07:00</published><updated>2008-04-22T14:50:17.171-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>Changing Spring Beans Using Properties</title><content type='html'>If you're reading this article, I assume you know about &lt;a href="http://springframework.org/"&gt;Spring&lt;/a&gt;. I'm currently using Spring 2.0.7, but the following code still holds for Spring 2.5 (although 2.5 now has the &lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/xsd-config.html#xsd-config-body-schemas-context"&gt;context &lt;/a&gt;schema if you prefer)   &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Ill hopefully come back and update this later...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have an application that sometimes needs to be run as a standalone app, and sometimes as a client-server. In other words, my user interface sometimes needs to talk to a command handler running in the same process, and sometimes this command handler needs to be remote.&lt;br /&gt;&lt;br /&gt;Lets say my user interface looks like:&lt;br /&gt;&lt;pre&gt;package com.acme;&lt;br /&gt;public class UserInterface {&lt;br /&gt;   private CommandHandler handler;&lt;br /&gt;   public void setCommandHandler(CommandHandler handler) {&lt;br /&gt;       this.handler = handler;&lt;br /&gt;   }&lt;br /&gt;   public String do(String command) {&lt;br /&gt;       return handler.handleCommand(command);&lt;br /&gt;   }&lt;br /&gt;   public static void main() {&lt;br /&gt;       ApplicationContext ctx = ...&lt;br /&gt;       UserInterface ui = (UserInterface ) ctx.getBean("ui");&lt;br /&gt;    System.out.println(ui.do("greet"));   &lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Where &lt;tt&gt;CommandHandler&lt;/tt&gt; is a interface with a single POJO implementation of:&lt;br /&gt;&lt;pre&gt;package com.acme;&lt;br /&gt;public class CommandHandlerImpl implements CommandHandler {&lt;br /&gt;   public String handleCommand(String command)  {&lt;br /&gt;       if ("greet".equals(command)) {&lt;br /&gt;           return "hello";&lt;br /&gt;       } else {&lt;br /&gt;           return "unrecognised command";&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;When I run this in standalone, I can wire everything like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id="commandHandler" class="com.acme.CommandHandlerImpl"/&gt;&lt;br /&gt;&amp;lt;bean id="ui" class="com.acme.UserInterface"&gt;&lt;br /&gt;   &amp;lt;property name="commandHandler" ref="commandHandler"/&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, for the client-server version, I am hosting my CommandHandler inside tomcat, and using Spring's DispatcherServlet. The code in the web.xml deployment descriptor looks like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;servlet&gt;&lt;br /&gt;    &amp;lt;servlet-name&gt;dispatcher&amp;lt;/servlet-name&gt;&lt;br /&gt;    &amp;lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&amp;lt;/servlet-class&gt;&lt;br /&gt;&amp;lt;/servlet&gt;&lt;br /&gt;&amp;lt;servlet-mapping&gt;&lt;br /&gt;   &amp;lt;servlet-name&gt;dispatcher&amp;lt;/servlet-name&gt;  &lt;br /&gt;   &amp;lt;url-pattern&gt;*.service&amp;lt;/url-pattern&gt;&lt;br /&gt;&amp;lt;/servlet-mapping&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;For this configuration, the servlet will look in dispatcher-servlet.xml for the Spring configuration. I am using &lt;a href="http://xfire.codehaus.org/"&gt;XFire &lt;/a&gt;(although you could use &lt;a href="http://incubator.apache.org/cxf/"&gt;CXF &lt;/a&gt;or &lt;a href="http://static.springframework.org/spring-ws/sites/1.5/"&gt;Spring WS 1.5&lt;/a&gt;) as a way of remoting my CommandHandler, so it looks like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;import resource="classpath:org/codehaus/xfire/spring/xfire.xml"&gt;&lt;br /&gt;&amp;lt;bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt;&lt;br /&gt;    &amp;lt;property name="mappings"&gt;&lt;br /&gt;        &amp;lt;props&gt;&lt;br /&gt;            &amp;lt;prop key="/xfire.service"&gt;remote.xfire&amp;lt;/prop&gt;&lt;br /&gt;        &amp;lt;/props&gt;&lt;br /&gt;    &amp;lt;/property&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&amp;lt;bean id="target" class="com.acme.CommandHandlerImpl" /&gt;&lt;br /&gt;&amp;lt;bean id="remote.xfire" class="org.codehaus.xfire.spring.remoting.XFireExporter"&gt;&lt;br /&gt;    &amp;lt;property name="serviceFactory" ref="xfire.serviceFactory"/&gt;&lt;br /&gt;    &amp;lt;property name="xfire" ref="xfire"/&gt;&lt;br /&gt;    &amp;lt;property name="serviceBean" ref="target"/&gt;&lt;br /&gt;    &amp;lt;property name="serviceClass" value="com.acme.CommandHandler"/&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And when I want to connect to this my original spring XML now needs to look like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id="ui" class="com.acme.UserInterface"&gt;&lt;br /&gt;   &amp;lt;property name="commandHandler" ref="commandHandler"/&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&amp;lt;bean id="commandHandler" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean" lazy-init="true"&gt;&lt;br /&gt;    &amp;lt;!-- Assumes war is named web.war --&gt;&lt;br /&gt;    &amp;lt;property name="wsdlDocumentUrl" value="http://localhost:8080/web/xfire.service?wsdl" /&gt;&lt;br /&gt;    &amp;lt;property name="serviceInterface" value="com.acme.CommandHandler" /&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Phew! Now the next step is to let me choose which bean is injected into the user interface. For this, I like to use a properties based approach. Spring includes a PropertyPlaceholderConfigurer which is normally used for replacing string values, so for example my wsdlDocumentUrl property could have been specified as &lt;tt&gt;"http://${com.acme.host}:${com.acme.port}/web/xfire.service?wsdl"&lt;/tt&gt;, and we could have used a PropertyPlaceholderConfigurer to replace the &lt;tt&gt;${..}&lt;/tt&gt; tokens as Spring startup.&lt;br /&gt;&lt;br /&gt;However, we can actually use PropertyPlaceholderConfigurer to inject references to different beans! So lets rewrite the user interface spring file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id="clientPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;&lt;br /&gt;    &amp;lt;property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"&gt;&lt;br /&gt;    &amp;lt;property name="location" value="com-acme.properties" /&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&amp;lt;bean id="ui" class="com.acme.UserInterface"&gt;&lt;br /&gt;   &amp;lt;property name="commandHandler" ref="${com.acme.connection}"/&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&amp;lt;bean id="local" class="com.acme.CommandHandlerImpl"/&gt;&lt;br /&gt;&amp;lt;bean id="remote" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean" lazy-init="true"&gt;&lt;br /&gt;    &amp;lt;!-- Assumes war is named web.war --&gt;&lt;br /&gt;    &amp;lt;property name="wsdlDocumentUrl" value="http://localhost:8080/web/xfire.service?wsdl" /&gt;&lt;br /&gt;    &amp;lt;property name="serviceInterface" value="com.acme.CommandHandler" /&gt;&lt;br /&gt;&amp;lt;/bean&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And that's it! If we run the user interface with &lt;tt&gt;-Dcom.acme.connection=local&lt;/tt&gt; then the bean named 'local' gets injected in, and everthing runs in the same standalone process. If we run the user interface with &lt;tt&gt;-Dcom.acme.connection=remote&lt;/tt&gt; then the bean named 'remote' gets injected in, and we communicate with a our XFire web service.&lt;br /&gt;&lt;br /&gt;Hope this helps :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-3323451528266356513?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/3323451528266356513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=3323451528266356513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/3323451528266356513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/3323451528266356513'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2008/04/changing-spring-beans-using-properties.html' title='Changing Spring Beans Using Properties'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-1132953738485215282</id><published>2008-04-14T05:16:00.000-07:00</published><updated>2008-04-22T09:21:11.029-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='jpda'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Debugging external tomcat from within Eclipse</title><content type='html'>I know that Eclipse has a 'Server' view, and that you can debug a Dynamic Web Application project quite easily. However, sometimes I want to start an external tomcat process using ant. Here are three straightforward ant tasks for running tomcat:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;target name="tomcat-start"&amp;gt;&lt;br /&gt;&amp;lt;java jar="${tomcat.home.dir}/bin/bootstrap.jar" fork="true"&amp;gt;&lt;br /&gt;   &amp;lt;jvmarg value="-Dcatalina.home=${tomcat.home.dir}" /&amp;gt;&lt;br /&gt;   &amp;lt;arg line="start" /&amp;gt;&lt;br /&gt;&amp;lt;/java&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target name="tomcat-debug"&amp;gt;&lt;br /&gt;&amp;lt;java jar="${tomcat.home.dir}/bin/bootstrap.jar" fork="true"&amp;gt;&lt;br /&gt;   &amp;lt;jvmarg value="-Dcatalina.home=${tomcat.home.dir}" /&amp;gt;&lt;br /&gt;   &amp;lt;jvmarg value="-Xdebug" /&amp;gt;&lt;br /&gt;   &amp;lt;jvmarg value="-Xrunjdwp:transport=dt_socket,address=7070,server=y" /&amp;gt;&lt;br /&gt;   &amp;lt;jvmarg value="-Djpda=true" /&amp;gt;&lt;br /&gt;   &amp;lt;arg line="start" /&amp;gt;&lt;br /&gt;&amp;lt;/java&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target name="tomcat-stop"&amp;gt;&lt;br /&gt;&amp;lt;java jar="${tomcat.home.dir}/bin/bootstrap.jar" fork="true"&amp;gt;&lt;br /&gt;   &amp;lt;jvmarg value="-Dcatalina.home=${tomcat.home.dir}" /&amp;gt;&lt;br /&gt;   &amp;lt;arg line="stop" /&amp;gt;&lt;br /&gt;&amp;lt;/java&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The tomcat-debug target makes use of the Java Platform Debugger Architecture (&lt;a href="http://java.sun.com/javase/technologies/core/toolsapis/jpda/"&gt;JPDA&lt;/a&gt;) which provides support for remote debugging. Running this ant task will cause tomcat to start, and then await connection from a remote debugger.&lt;br /&gt;&lt;br /&gt;To connect to this application from eclipse, click on the 'Debug' icon in the toolbar, and choose 'Open Debug Dialog'. Click on the 'Remote Java Application' node, and click on the 'New' button to create a new launch configuration.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Specify the connection type to be 'Standard (Socket Attach)'&lt;/li&gt;&lt;li&gt;Specify Connection Properties as localhost, 7070&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Press 'Debug' and if all goes well, you should now be debugging your web-application running in the external tomcat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-1132953738485215282?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/1132953738485215282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=1132953738485215282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/1132953738485215282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/1132953738485215282'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2008/04/debugging-external-tomcat-from-within.html' title='Debugging external tomcat from within Eclipse'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-7073140159368408612</id><published>2008-02-20T06:54:00.000-08:00</published><updated>2008-04-22T09:22:12.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='JTS'/><category scheme='http://www.blogger.com/atom/ns#' term='transaction'/><category scheme='http://www.blogger.com/atom/ns#' term='JTA'/><category scheme='http://www.blogger.com/atom/ns#' term='XA'/><title type='text'>Excellent book on Java transactions</title><content type='html'>Just finished an excellent book on Java Transactions: &lt;a href="http://www.amazon.co.uk/dp/1411695917"&gt;Java Transaction Design Strategies&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It packs a lot of information into a small book, but in a very clear style of writing, devoid of buzzword bingo (anyone &lt;span style="font-weight: bold;"&gt;tried&lt;/span&gt; to read a book on SOA/ESB recently?!?)&lt;br /&gt;&lt;br /&gt;It manages to explain complicated concepts without too much headscratching, and provides focused code examples in EJB 2.x, EJB 3, and Spring for comparison.&lt;br /&gt;&lt;br /&gt;A definite must have!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-7073140159368408612?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/7073140159368408612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=7073140159368408612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/7073140159368408612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/7073140159368408612'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2008/02/excellent-book-on-java-transactions.html' title='Excellent book on Java transactions'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-3259744841930217320</id><published>2008-02-04T07:12:00.000-08:00</published><updated>2008-12-08T16:11:23.741-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='killVBS'/><category scheme='http://www.blogger.com/atom/ns#' term='virus'/><category scheme='http://www.blogger.com/atom/ns#' term='vbs'/><category scheme='http://www.blogger.com/atom/ns#' term='malware'/><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><title type='text'>killVBS.vbs malware</title><content type='html'>&lt;div&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;I detected quite a  seemingly innocuous bit of malware on my PC, that doesn't seem to be &lt;/span&gt;&lt;/span&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;detected by  my virus checker.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;A while back, I  noticed I could no longer double-click on my USB flash drive to open  it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;After a bit of  searching, I discovered an autorun.inf and and a VBS script called killVBS.vbs  had appeared on my flash drive.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;These files reappeared seconds after deleting them. After further investigation, it appears  that a script running on my PC was recreating these files&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;I took the following steps, which seems to have removed the malware for good from my PC.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt;  &lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Kill the wscript  process that is running the killVBS.vbs. (I prefer &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;Process Explorer&lt;/a&gt; to Task Manager)&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4fpVbRyWSxk/R6ctlVcgZtI/AAAAAAAAAAU/LwXH6ZBBWoc/s1600-h/killVBS.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_4fpVbRyWSxk/R6ctlVcgZtI/AAAAAAAAAAU/LwXH6ZBBWoc/s320/killVBS.jpg" alt="" id="BLOGGER_PHOTO_ID_5163145617238681298" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;From Windows  Explorer, choose Tools -&gt; Folder Options&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Choose View tab,  and&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;[X] Show hidden  files and folders&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;[  ] Hide  extensions for known file types&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;[   ] Hide  protected operating system files&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Go to  C:\WINDOWS\system32 and delete the (previously hidden) killVBS.vbs  file&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Run regedit, and  search for Userinit&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4fpVbRyWSxk/R6ctwVcgZuI/AAAAAAAAAAc/RVGrfHjqa9o/s1600-h/regedit.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_4fpVbRyWSxk/R6ctwVcgZuI/AAAAAAAAAAc/RVGrfHjqa9o/s320/regedit.jpg" alt="" id="BLOGGER_PHOTO_ID_5163145806217242338" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Edit this  registry entry, removing the 'C:\WINDOWS\system32\wscript.exe  C:\WINDOWS\system32\killVBS.vbs' part&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="757215109-31012008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Restart the  computer&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-3259744841930217320?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/3259744841930217320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=3259744841930217320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/3259744841930217320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/3259744841930217320'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2008/02/killvbsvbs-malware.html' title='killVBS.vbs malware'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4fpVbRyWSxk/R6ctlVcgZtI/AAAAAAAAAAU/LwXH6ZBBWoc/s72-c/killVBS.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7542700.post-5184786041519706548</id><published>2008-01-31T11:16:00.000-08:00</published><updated>2008-04-22T09:23:22.495-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='Perforce'/><category scheme='http://www.blogger.com/atom/ns#' term='SCM'/><category scheme='http://www.blogger.com/atom/ns#' term='TeX'/><category scheme='http://www.blogger.com/atom/ns#' term='LaTeX'/><category scheme='http://www.blogger.com/atom/ns#' term='RCS'/><title type='text'>LaTex RCS and Perforce</title><content type='html'>I'm not a big fan of Microsoft Word.&lt;br /&gt;&lt;br /&gt;One bugbear I have is that I would like my documents to show a version indication of the last time they were checked into our SCM system. Our company uses &lt;a href="http://www.perforce.com/"&gt;Perforce&lt;/a&gt;. As most SCM systems do, Perforce supports some &lt;a href="http://kb.perforce.com/UserTasks/ManagingFile..Changelists/UsingRcsKeywords"&gt;RCS keywords&lt;/a&gt;. However, keyword expansion only works for text files. So this wont work for binary Word documents.&lt;br /&gt;&lt;br /&gt;However, I decided to have a go at using &lt;a href="http://www.latex-project.org/"&gt;LaTeX&lt;/a&gt; again. I used to use it back when I was doing research at Uni, as one of its strengths is that it saves Technical Journal publishers from having to unify a whole mishmash of document styles. They just ask for a LaTeX document, and then apply their own style.&lt;br /&gt;&lt;br /&gt;I also like LaTeX for the same reason I like &lt;a href="http://www.vim.org/"&gt;vi&lt;/a&gt;. Power. LaTeX is more like a programming language, with lots of extensions written by people far cleverer than me.&lt;br /&gt;&lt;br /&gt;LaTeX has quite a learning curve, and is not for the faint hearted. At least the installation process has been simplified somewhat. What I did was download &lt;a href="http://www.tug.org/protext/"&gt;proTeXt&lt;/a&gt;, which bundles a whole bunch of stuff you need to get up and running:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;it includes &lt;a href="http://www.miktex.org/"&gt;MiKTeX&lt;/a&gt;, an up to date TeX implementation for Windows.&lt;/li&gt;&lt;li&gt;it includes &lt;a href="http://www.toolscenter.org/"&gt;TeXnicCenter&lt;/a&gt;, an easy to use editor for LaTeX files.&lt;/li&gt;&lt;li&gt;plus some other stuff...&lt;/li&gt;&lt;/ul&gt;So, back to the challenge at hand: Have my documents show information on when they were last checked into SCM.&lt;br /&gt;&lt;br /&gt;First, I need to tell my SCM system to turn on RCS keyword expansion for this document. With Perforce, this is quite easy to do:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Open the file for edit&lt;/li&gt;&lt;li&gt;Then choose to change the file type, and turn keyword expansion on&lt;/li&gt;&lt;li&gt;Edit the file, to include a $DateTime$ string.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now submit the file back into perforce.&lt;/li&gt;&lt;li&gt;If all has gone well, the file should contain something similar to $DateTime: 2008/01/30 12:28:42 $&lt;/li&gt;&lt;/ul&gt;Now, I need to use the &lt;span style="font-style: italic;"&gt;rcs &lt;/span&gt;package, that is able to parse RCS keywords. So my document may start with:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;\documentclass{article}&lt;br /&gt;\title{your title here}&lt;br /&gt;\author{who are you}&lt;br /&gt;%&lt;br /&gt;% Get RCS information into document&lt;br /&gt;\usepackage{rcs}&lt;br /&gt;\RCS $DateTime: 2008/01/30 12:28:42 $&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, the variable \RCSDateTime contains the date and time of the last checkin. I then use the &lt;span style="font-style: italic;"&gt;fancyhdr &lt;/span&gt;package to ensure this information appears in the footer of each page:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;\documentclass{article}&lt;br /&gt;\title{your title here}&lt;br /&gt;\author{who are you}&lt;br /&gt;%&lt;br /&gt;% Get RCS information into document&lt;br /&gt;\usepackage{rcs}&lt;br /&gt;\RCS $DateTime: 2008/01/30 12:28:42 $&lt;br /&gt;%&lt;br /&gt;% Support fancy headers/footers&lt;br /&gt;\usepackage{fancyhdr}&lt;br /&gt;\pagestyle{fancy}&lt;br /&gt;\lhead{}&lt;br /&gt;\chead{}&lt;br /&gt;\rhead{}&lt;br /&gt;\lfoot{}&lt;br /&gt;\cfoot{\thepage}&lt;br /&gt;\rfoot{Document Version: \\ \RCSDateTime}&lt;br /&gt;\renewcommand{\headrulewidth}{0pt}&lt;br /&gt;\renewcommand{\footrulewidth}{0.4pt}&lt;br /&gt;%&lt;br /&gt;%&lt;br /&gt;\begin{document}&lt;br /&gt;\maketitle&lt;br /&gt;\thispagestyle{fancy}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And thats it. Hope this works for you :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7542700-5184786041519706548?l=toolkits.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://toolkits.blogspot.com/feeds/5184786041519706548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7542700&amp;postID=5184786041519706548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/5184786041519706548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7542700/posts/default/5184786041519706548'/><link rel='alternate' type='text/html' href='http://toolkits.blogspot.com/2008/01/latex-rcs-and-perforce.html' title='LaTex RCS and Perforce'/><author><name>toolkit</name><uri>http://www.blogger.com/profile/04331503406333914951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_4fpVbRyWSxk/SfYMFD-GXtI/AAAAAAAAAB4/L8rcnFI0E5s/s1600-R/86c2fc4bb34d85ec8174f67fd21f256c'/></author><thr:total>0</thr:total></entry></feed>
