Posts

Showing posts with the label java

Spring Framework Sample Main Method

So my desk-mate* and I were having a conversation about an upcoming coding project, and he remarked how nice it was for someone, somewhere to post a complete sample on their blog for the spiders to index, so that he can find it. So I thought I would also, pay it forward and hopefully someone in like 2012 comes by and needs a sample main method using the spring spring framework for application level dependency injection. Everyone out there seems to have used the MVC and deploying spring based apps in a web server WAR file. Except for this link: Levarage Spring Web development with Offspring . [Offtopic: it uses classes in the com.offspring.* package, like the band's website !] It uses a simple bean file and a main method really close to the following snippet to instantiate (that's my new favorite word) the application using the spring context**: import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; ...

my foray into xmlrpc - calling perl from java

Image
XMLRPC is supposedly the new RPC mechanism to handle remote method calls independent of programming language, platform type, or location. Basically, it is how CORBA was supposed to be. Of course, it formats data into xml packaged into an HTTP message. This is not SOAP though, and I still don't really know the difference, other than SOAP is a the packaging for WebServices and has its own strict way of defining method and method arguments(?). Anyways, XML-RPC sounds perfect to get some crappy Perl to Java method calls working! The problem as I see it, is that the XMLRPC mechanism is usually "extended" to handle language specific needs. This makes things a lot easier when you are using it to call remote methods in a uniform environment. The problem is that thats not what I want, as extensions in Java will make the Perl methods die. A horrible death. In Perl there are two cpan modules that facilitate the XMLRPC mechanism that I tried: RPC::XML and XMLRPC::Transport in t...