Posts

Showing posts from 2009

Drools Configurations

Message Driven POJOs!

Image
Message Driven POJOs! Posted on August 11th, 2006 by Mark Fisher in 2.0 , JMS , Spring . Of all the new Spring 2.0 features and improvements, I must admit that Message-Driven POJOs are one of my personal favorites. I have a feeling that a lot of other Spring users will feel the same way. Here I am providing a quick introduction. There is a lot more to show, and I will follow this up with other posts. For now though - this should provide you with enough information to get up and running with some truly POJO-based asynchronous JMS! I hope you are as excited about that as I am Prerequisites: You will need the following JAR files on your classpath. I've also listed the versions that I am using (any spring-2.x version should be fine. I just dropped RC3 in there about 2 minutes ago in fact): activemq-core-3.2.2.jar concurrent-1.3.4.jar geronimo-spec-j2ee-managment-1.0-rc4.jar commmons-logging-1.0.4.jar log4j-1.2.9.jar jms-1.1.jar spring-2.0-rc3.jar Setup the En...

ActiveMQ 5.1.0 tutorial

It is always good to know at least one message brokers. ActiveMQ is one of those top brokers used actively industry wide. So, here is a small tutorial or tips to use ActiveMQ along with java messaging service. Installations I am using the following configuration on my system: 1. Windows XP 2. JDK 5 update 15 3. ActiveMQ 5.1.0 Download activeMQ from http://activemq.apache.org/ . Unzip to any suitable location. And the installation is done!!! Directory Structure After you unzip, there are few basic files you need to know. a. The bin folder contains the batch file, activemq.bat, using which you can start the server. It also contains activemq-admin.bat, using which you can get more details about activemq, like a listing of queues etc. b. The conf folder contains the activemq.xml configuring the ActiveMQ broker. Here is where we can configure the transports, permanent queues etc. Creating Temporary Queues Firt run bin/activemq.bat. This should start ActiveMQ listening at port 61616. There i...

Reinstall Ubuntu Grub Bootloader After Windows Wipes it Out

Image
If you run a dual-boot system with Linux and Windows, this has happened to you. You had to do your monthly reinstall of Windows, and now you don't see the linux bootloader anymore, so you can't boot into Ubuntu or whatever flavor of linux you prefer. Here's the quick and easy way to re-enable Grub. This option will use the Desktop/Live CD to install Grub into your MBR (Master Boot Record). This option will overwrite your Windows Boot Loader . It is OK to do this, in fact that is the goal of this how to (in order to boot Ubuntu) 1. Boot the Desktop/Live CD. (Use Ubuntu 8.04 or later) 2. Open a terminal (Applications -> Accessories -> Terminal) 3. Start grub as root with the following command Open a Terminal and type in the following commands, noting that the first command will put you into the grub "prompt", and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is whe...

Extract tar.bz2 file in UBUNTU

tar -xvjf also using following command user can extract list of files for tarfile in `ls *.tar.bz2` do tar -xvjf $tarfile done
Image
NeoReader is a mobile code scanner NeoReader is a mobile application that turns a camera mobile phone into a code scanner and provides one-click access to mobile content on the go, anytime and anywhere. NeoReader features NeoMedia’s patented resolution technology and Gavitec’s ultra-small footprint and platform-independent code scanning algorithms. The NeoReader mobile application operates on many handsets. An audio alert lets you know that NeoReader is connecting to your desired destination on the mobile Web. NeoReader can read: Data Matrix, QR code, Aztec code, EAN, UPC and Code 128 can be read easily and promptly by the NeoReader mobile application. Free Download: just Point your mobile browser to: http://get.neoreader.com/ ZebraScan - Free Barcode Scanner For Mobiles ZebraScan  is a free UPC/EAN  barcode scanner  for Nokia phones. It will look up the product name so you can access product and price information right at the store. Nokia N-Series Edition: Supports  N95, N95 8GB , N93...

Nokia 5320

Secret codes: * *#06#To check IMEI number (International Mobile Equipment Identity). * *#0000#NOKIA Firmware version and date, Phone Model and Operator Variant. * *#92702689#Life timer (W A R 0 A N T Y) The time in which the phone has spent insending and receiving calls. * *#62209526#Wireless MAC Address (M A C _ W L A N). * *#2820#Bluetooth MAC address (B T A 0?). * *#7370#Format phone (Soft Reset). * *#7780#NOKIA Factory Reset (Hard Reset).

Mobicents Beginners

A JAIN SLEE beginner's tutorial? That's a question I see frequently in Mobicents forums, and so I decided to write one that examples how to use Mobicents JAIN-SLEE Server and the last tools we made around Apache Maven2. You can call it "Developing a Hello World JAIN SLEE service in 30 minutes or less". Of course, before we need a working environment, so you need to install Mobicents JAIN SLEE server binary (don't forget to add an environment variable JBOSS_HOME pointing to the jboss-4.2.2.GA directory of the Mobicents install), and for this tutorial you will also need the Eclipse IDE and Apache Maven2. Additionally you will need to setup Mobicents JAIN SLEE Maven Archetypes. Click on the links for instructions on how to do that. Ready to rumble? Lets start by creating the Maven2 project using Mobicents JAIN SLEE Maven Archetypes. Part 1 - Creating the Maven2 project Open a bash/terminal/command line in the Eclipse workspace directory and type mvn archetype:generat...

MySQL - Replication

Hi all, Mysql replication helps to replicate data from one mysql server (called "Master") to another server or servers (called "slave/slaves" which locates either same machine where Master locates or a remote machine). This is useful in certain occations like when we have to keep a backup of a database while restricting read /write permission of one so that data is secure in that particular database and also when we have to reduce the load over one database so that we get the maximum efficiency. You can replicate all database or a particuler database/s or even a table. So here are the steps to do that. N.B : If you want to replicate in one machine you have to install 2 mysql servers that is running in two ports. I assume that you are aware of installing mysql.Here are the steps to setup replication in a one machine. When you install and run mysql it will ues its default configuration file "my.cnf". So if you want to add extra features you have create your ...

Watermarking Images in a Java Servlet

Image
In our previous tutorial , we showed how to create dynamic images images in a servlet. In this tutorial, we are going to take it a step further by dynamically adding a text watermark to an image as it is requested. Setting up the Servlet In the web.xml, you will need to configure a filter that will be used to call the servlet. By creating a filter, this will simplify the url used to access the servlet and image. To an end user, the filter will look like part of the directory structure for the image. The servlet will be invoked when the url contains the pattern /watermark/*. In our example, we will place the images in a directory called photos in the web application directory. To view the image without the watermark, you would use the url http://webserver/webapp/photos/car.jpg. To invoke the servlet, you would use the url http://webserver/webapp/watermark/photos/car.jpg. view plain copy to clipboard print ? servlet > servlet-name > com.codebeach.servlet.Wa...

Install Skype on Ubuntu

Skype Instant messanger in Debian As the root user, add this line to the end of your /etc/apt/sources.list file and save. #vi /etc/apt/sources.list deb http://download.skype.com/linux/repos/debian/ stable non-free Now you need to update your source list using the following command #apt-get update

CXF MTOM DATA BINDING

Image
Upload attachment (document) using CXF ( MTOM ) Spring and Tomcat Incase you have any difficulty in setup please contact us . Let us now create a resume upload web service using Apache CXF, Spring and Tomcat and consume it. The web service will be used to upload an attachment [resume]. The scenario considered here is a candidate uploading his/her resume and the resume [word document] is retrieved and stored on the server. The following files are involved in the demo of the tutorial. Download the files (zip format) Resume.java This DTO (value object) represents the resume of a candidate. ResumeUploadService.java This interface has uploadResume method which accepts a Resume. ResumeUploadServiceImpl.java Implementation class for ResumeUploadService.java Client.java Code which consumes the web service. cxf.xml Informs Spring [which is referenced from CXF] about the related Java classes for a given web service. Before getting into the details of the above files ...