Tunning performance of jboss seam

In jboss seam u can use s:cache which is a cache implementation for seam,  using cache in the container level rather that the application server. This two links below will give you more information on this:
http://docs.jboss.org/seam/latest/reference/en-US/html/cache.html

http://docs.jboss.org/seam/latest/reference/en-US/html/performance.html

Advertisements

Jboss AS 5.1.0.GA change datasource to MYSQL.

Below I give the steps for changing the datasource of jboss server from hsqldb to mysql database (mainly for remembering the exact steps required, but it may also help some people).

Jboss server version = 5.1.0.GA
Mysql version = 5.1
mysql jdbc driver = mysql-connector-java-5.1.13-

bin

Below I use the directories of my setup please change those as required per your setup.
First step is to change the hsqldb ds file inside the deploy directory of jboss and replace it with the one for mysql given in the example. So :
Copy mysql-ds from C:\dev\appServers\forSeam\jboss-5.1.0.GA\docs\examples\jca and place it in the directory C:\dev\appServers\forSeam\jboss-5.1.0.GA\server\default\deploy.
Then delete hsqldb-ds from C:\dev\appServers\forSeam\jboss-5.1.0.GA\server\default\deploy.

Now lets do some change in the mysql datasource:

First open mysql-ds in your favorite editor (Notepad++ for example).

Inside you will see a line that looks like this :

<jndi-name>MySqlDS</jndi-name>

change this to:

<jndi-name>DefaultDS</jndi-name>

Change according to your needs the line that specifies the url of mysql:

<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>

In my case I changed it to:

<connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>

The lines below is where you specify your database credentials:

<user-name>x</user-name>
<password>y</password>

please change the above accordingly.

Now put the jar named mysql-connector-java-5.1.13-bin (which you must download from the mysql site www.mysql.com <http://www.mysql.com/>) in the directory :

C:\dev\appServers\forSeam\jboss-5.1.0.GA\server\default\lib

Now chnge the following You also need to replace the C:\dev\appServers\forSeam\jboss-5.1.0.GA\server\default/deploy/messaging/hsqldb-persistence-service.xml file with the C:\dev\appServers\forSeam\jboss-5.1.0.GA\docs\examples\jms/mysql-persistence-service.xml file.

Now if you try to run the server you will get the following erroe in the console:

jboss.deployment:id=”jboss.messaging:service=PersistenceManager”,type=Component already registered.

In order to resolve this, in your mysql-persistence-service.xml replace the following line :
|<depends optional-attribute-name=||”ChannelFactoryName”||>jboss.jgroups:service=ChannelFactory</depends>|
with the following:
|<attribute name=||”ChannelFactoryName”||>jboss.jgroups:service=ChannelFactory</attribute>|

now everything should run smoothly.

thanks

start eclipse with alternative – alternate virtual machine vm

There are times when you need eclipse to use a specific java virtual machine ( a plugin may require it e.g m2eclipse), and you want your sources to be compiled with another java virtual machine.  Or your want to start eclipse with a different virtual machine than the one you have set your JAVA_HOME environmental variable.In order to start eclipse with an alternative java virtual machine you need to pass the -vm argument to your eclipse.exe. Assuming now that you have an eclipse shortcut in your desktop. And that the installation directory of your java is :

C:\dev\java\jdk1.5.0_22

Your write click on your shortcut, then choose properties, and then in the target you type the following:

C:\dev\eclipse\eclipse.exe -vm C:\dev\java\jdk1.5.0_22\bin\javaw.exe

This means that you can have different shortcuts that point on eclipse, where each shortcut can start eclipse with a different virtual machine 🙂

a bit of personal info

First of all a little bit about myself.

My name is ioannis ntantis and I come from Greece. I am 25 years at the time of writing this (09/2011). I studied computer science in Northumbria University at Newcastle Upon Tyne ( www.unn.ac.uk).  My course was more oriented  in embedded systems and had only a little bit of web programming. My dissertation topic “Autonomous robot navigation, withing an unknown terrain by using only tactile sensing”. Here I would like to take the opportunity to thank Mr Emil Petkov who was my tutor in the dissertation.
After that I worked for one year in Nissan Motor Manufacturing in the UK Sunderland plant as a junior software developer. My mainly duties involved programming the IBM mainframe in the language NATURAL and JCL.
After completing one year in NISSAN, I decided to move over to Greece which is my mother country. I started working in European Dynamics SA ( www.eurodyn.com) as web developer. Some of the technologies I used there include struts2, hibernate, EJB 3.0, Spring, Tiles, JBoss etc. In July 2011 I joined Intracom Telecom (www.intracom-telecom.com) which is the company that I currently work for.

I have spent some of time also reading and trying other frameworks etc like jboss seam, freemarker and drools.

In my free time, I enjoy playing football, going for walks in mountains etc.. AND READING JAVA OF COURSE 🙂

Soon, and as the time allow, I will be putting more staff in this blog relating to technological tutorials and opinions.