February 12th, 2009 by james
I have been tring for a few hours to try and get JAXB to apply a Stylesheet in my CXF (JSR-311) Provider and I final cracked it. So I thought I would share,
It all started with creating a child class to CXF supplied class JAXBElementProvider. I then added a method overriding the WriteTo method.
Get the transformer
TransformerFactory tf = TransformerFactory.newInstance();
SAXTransformerFactory stf = (SAXTransformerFactory)tf;
Get the stylesheet and basically store it in templates object (some Spring improvements to be made here).
StreamSource myStylesheetSrc = new StreamSource(
getClass().getResourceAsStream("my-stylesheet.xslt"));
Templates templates = stf.newTemplates(myStylesheetSrc);
Set up the TransformerHandler
TransformerHandler th = stf.newTransformerHandler(templates);
Because we are in the writeTo method of the Provider we are dealing with streams so set the output to go to wherever cxf is expecting it.
th.setResult(new StreamResult(os));
Finally actually marshal the object
ms.marshal(actualObject, th);
September 2nd, 2008 by james
Google has announced that it is going to release its own web browser called Google Chrome.
The full announcement can be found at http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html
It says it should be ready any time soon (Tuesday). Can’t wait to see what this is like. I am expecting lots. I hope Google can deliver.
The new browser is pulling together a set of technologies including V8 Javascript engine and an intelligent address bar and lots more gadgets.
Beta will only be available for Windows for now, but Google say the other version for Mac and Linux will follow.
Watch this space.
September 1st, 2008 by james
Take a look at this
http://www.codinghorror.com/blog/archives/001166.html
Very interesting post about SQL Server locking that could help every one of understand and solve them with SQL Server.
I understand the “theory” and have experienced the “practise” and I can’t fault the conclusions.
August 31st, 2008 by james
I have recently set up Google Docs. I managed to configure it using another domain. I have only been playing with it a few days, but I am not sure what it adds over my existing Google Account. Apart from working with a domain of my choosing it doesn’t include some functions of the “old” Google Account. Even the google mail client has some functions missing.
Even with the functions that are present I can’t migrate my data or merge my accounts.
In any case I’m not using Google Docs any more. I just use it to get my email from a POP mail server. Got all the results I need and all in one tidy package. Seems like Google have missed something here, not like them.
Anyone migrated to Google Docs?
August 17th, 2008 by james
Just installed Firefox on my laptop and been having some trouble getting the spell checking function to work. It turned out that it was because I didn’t have a dictionary installed.
To install a dictionary you need to right click on a text or other kind of data entry box. If this menu contains the Add dictionaries option, then you don’t have any dictionaries at all so click on it to download one from Firefox. If the menu has a languages option instead, then in sub menu make sure that the language you want to spell check with is selected (has a tick next to it).
Hey presto, Firefox now underlines in small red dots any words it considers misspelled.
August 17th, 2008 by admin
If you need to get yourself or a bunch of developers up to speed on the Spring framework quickly, don’t mess around with courses or anything, just buy them the book Spring in Action by Craig Walls. First chapter explains dependency injection brilliantly.
You get either buy it from you favourite book retailer or read it on O’Reilly’s safari website.
August 16th, 2008 by admin
Looks like something I have been waiting for, since floppy disk failures caused me many problems during my 90’s university days. Two questions;
- Why has it taken so long for someone to build this.
- How do I get an invite so I can use it.
Look at http://www.getdropbox.com/ and watch the screencast to be completely sold.
May 3rd, 2008 by james
We have been trying to improve the performance of the SQL Server database that we using to support our e-commerce platform. But the team have been very short of time, to see if we could get a quick win we would try to defragment the disk.
This was not quite completely in the dark, but was based on some previous experience of a system with fragmented disk and the sp_who and sysprocesses were showing up a high number of waits against PAGEIOLATCH_SH. We used the very much less than scientific query:
select lastwaittype, count(1) from master..sysprocesses group by lastwaittype
Now for the big news: Did it work? Well human perceived performance increased a little but the number of these waits didn’t seem to reduce. More work is required, but it has relieved some pressure for the time being, and perhaps even until we can finish re-jiging our hardware platform.
April 22nd, 2008 by james
Just installed WordPress on my IXHosting account. Took less then 10 minutes to download and install. I had to set up a mySQL database and a user on that database and then update a single PHP file with server and user information. That’s it! Job Done!