Posts

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 ...

CXF With Spring

* Set up your build for CXF * Writing a simple JAX-WS service * Set up the HTTP transport This example corresponds to the spring_http example in the CXF distribution. Setting up your build Open up your favorite IDE and create a new project. The first thing we need to do is add the necessary CXF dependencies to the project. You can find these dependencies in the CXF distribution in the lib directory. commons-logging-1.1.jar geronimo-activation_1.1_spec-1.0-M1.jar (or Sun's Activation jar) geronimo-annotation_1.0_spec-1.1.jar (JSR 250) geronimo-javamail_1.4_spec-1.0-M1.jar (or Sun's JavaMail jar) geronimo-servlet_2.5_spec-1.1-M1.jar (or Sun's Servlet jar) geronimo-ws-metadata_2.0_spec-1.1.1.jar (JSR 181) jaxb-api-2.0.jar jaxb-impl-2.0.5.jar jaxws-api-2.0.jar neethi-2.0.jar saaj-api-1.3.jar saaj-impl-1.3.jar stax-api-1.0.1.jar wsdl4j-1.6.1.jar wstx-asl-3.2.1.jar XmlSchema-1.2.jar xml-resolver-1.2.jar The Spring jars: aopalliance-1.0.jar spring-core-2.0.8.jar spring-be...

Key Idea

Name : Amila Silva Key: 3696-PAH5A-NCLEQ-ALNOU-RKVMP-9O584