Posts

Showing posts from 2007

WoW Ubuntu gusty 64 setup

I received a WoW invitation from a friend. Downloaded the install package from their website. First thing I tried is install it on my VM. That is a win xp guest of my Ubuntu amd64 gusty. Which did not work for some reason. The WoW crashes. I talked with my friend again, and find out that "many" uses Wine to run it. It's a surprise to me. Wine wasn't friendly at all back to 5 years ago. The open source world did so many great things. >sudo apt-get install wine >winecfg I set the virtual desktop to 1280x900 as another friend suggested. >wine ./Installer.exe Everything seems okay except the font is a little funny in that window. After everything is done, I try to start the WoW from the installer. It failed. Before that it was trying to install a html engine. That's where it failed. My heart sink a bit. I tried to run the WoW from it's ~/.wine/drive_c/..... /WoW.exe location. It's like a charm. The application stated, with a small problem. The mouse &

Apache mod_ssl tomcate Axis https user authentication

package com.tiandao.ws.util; import java.io.ByteArrayInputStream; import java.security.Principal; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import javax.servlet.ServletContext; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import org.apache.axis.MessageContext; import org.apache.axis.transport.http.HTTPConstants; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; public class AxisUtil { /** * This method read all possible certificate from request. If the apache * passes certificate to tomcate in "SSL_CLIENT_CERT", this method will * reads and create the certificate. * * @param request * @return */ public static X509Certificate getX509Certificate(HttpServletRequest request) { X509Certificate ret = null; String certString =

Exposed Domain Object implemented with Spring Aspect Transaction Control + AspectJ

Image
This application was designed and implemented as my first web app following the DDD principles. There are some interesting issues to solve. I had the domain models exposed to the presentation layer. No facade!??? Yeeeeaah, but not exactly. I did not see the similar design at other places yet. Which has no facade in front of domain models, no facade between presentation and business layers. I can imagine the reaction from people who are so used to facade. Spring+AspectJ allow you have this design. Using domain object that has the supporting DAO injected and letting "spring's annotation transaction aspect" handles the transaction. It can work. Although, using Spring+AspectJ can implement this design, it doesn't necessarily mean this design is good for all applications. An evaluation needs to be done. Here are the pros and cons . Pros: Faster development. It accelerates the development. No Facade for the exposed domain model. When a domain object is a natural entry point

New Stuffs Making Me Feel the Passion Again

Facelets Before knowing this, I can hardly think of a reason to use JSF. There are many benefits from using Facelets with your JSF app. I like the most is the "jsfc" attribute. What it does is converting xml element to another at runtime. With this feature, JSF can finally be "designer friendly". Although I haven't find a way to get the facelets template also friendly to html designers. It's hundred miles better than using bare JSF. From: <input type="text" jsfc="h:inputText" value="#{hello.world}" /> to: <h:inputText value="#{hello.world}" /> Inside Facelets Facelets fits JSF like a glove Developer Doc TestNG I like its annotation, data provider, dependent methods, and some other flexible features. TestNG Doc EasyMock Doesn't matter you are a classical or mockist styles of Test Driven Developer, you will find EasyMock is a good tool in your pocket. Mocks Aren't Stubs EasyMock Doc Shale Ever wondere

Domain Driven Design

What I can say, still a new new thing to do if you are working with a serious project, think it twice. It had given me some interesting challenge. Spring, aspectj, and Hibernate, the domain object are injected with the repository. Some how, domain driven design made me think that Eric Even's "Entity" are similar to EJB's "Entity" bean. They are all heavy objects. They all hide the details about the database operations. They all need this factory and service to complete the life cycle. Let me know if I am wrong about this. This is about a subtle problem during my development of a project. It related to hibernate lazy initialization. When the domain object loaded with hibernate configured lazy="true", and spring + run time aspectjweaver was trying to inject in the data store, I had this "CGLIB Enhancement failed [classname]" failure from hibernate. . Took me an hour to find out what really happened. Had no clue at first. Then there is no ot

Blizzard

Image
Here was what Edmonton just had on Jan 10, 2007. I was looking at Maven2 and am very convinced by its power. To have a project going, maven 2 can save you a lot of time on those small things. Testing report, build, dependency jar files and more. The Continuous Integration tool I used is continuum. A very nice tool, it works with Maven nicely. Another thing that is worth to mention is that JSF is not that bad after all. I spent a little time on JSF and found it's not hard to pick-up. It is going to win a bigger market share soon. Because it's "standard". A lot people will buy it just because of that.