Configure mod_jk

0

Posted by Jagadeesh VP | Posted in ,

Apache:

Place mod_jk.so file in <apache_home>/modules dir.
Instruct apache to load the file vis httpd.conf

LoadModule jk_module modules/mod_jk.so

Locate the file path of mod_jk.conf to apache via httpd.conf file

Include [file path]

change the <directory> tag entries
Host entry in extra/vhost.conf


Tomcat:

Place the following in server.xml

<listener className = "org.apache,jk.config.ApacheConfig"
modJk= "[mod_jk.so file location]"
workersConfig = "[workers.properties file location]"
jkLog = "[user defined location]"
jkDebug = "info" />


Add the following under <host> tag
<listener className = "org.apache.jk.config.ApacheConfig"
append="true" jkWorker="ajp13 [any name as in worker.properties]" />

OpenInviter

0

Posted by Jagadeesh VP | Posted in

This is an wonderful API for importing contacts from your mail. This API supports almost all known email providers, CMS and social networks.

More over this is an Open Source package. This is implemented in PHP. So to deploy this Apache is enough.

I am working with TOMCAT container. I don't have much knowledge about apache server.
But for me it took a vary small time to integrate OpenInviter with my application.

Your apache should have Php DOM extension & curl modules. This application need this two support from your web server.

I followed all the instructions given in the package. But it not worked in my server.

So i did the following changes in config.php

$openinviter_settings=array(
'username'=>"xxxxxxxxx",[Your_OpenInviter_Username]
'private_key'=>"xyxyxyxyxyyxyxyxyxyxyxyxyyxyx", [Your_OpenInviter_Private Key]
'cookie_path'=>"/tmp",
'message_body'=>"", [I'll get this from user]
'message_subject'=>"My Mail",
'transport'=>"curl",
'local_debug'=>"on_error",
'remote_debug'=>"",
'hosted'=>"",
'proxies'=>array(),
'stats'=>"",
'plugins_cache_time'=>"1800",
'plugins_cache_file'=>"oi_plugins.php",
'update_files'=>"1",
'stats_user'=>"",
'stats_password'=>""
);
?>

Hope this may be useful.

Leadership Quality

0

Posted by Jagadeesh VP | Posted in

* Always tell the fact. Create a foundation of fairness and openness.
* Communicate constantly and exhibit strong and active listening skills. Be approachable.
* Be frank, but kind. Let everyone know what is expected and be demanding as far as standards and values are concerned. Be encouraging.
* Be a problem solver and part of the solution, and be willing to delegate.
* Show patience, discipline and determination.
* Love what you do and have a generous spirit.
* Find balance in your work/life experiences and encourage and help others to do the same.
* Lead by example. Be receptive to new ideas. Be both a teacher and a learner. Value creativity and let people stretch themselves.
* Exercise moral courage.
* Create an ongoing reward and recognition program.
* Have a heart and don't be afraid to show it.

If you follow have these, then people will start following you.

Memory Monitor JSP

0

Posted by Jagadeesh VP | Posted in , ,

Place this JSP in your container to know the memory status

<%@ page import="java.lang.management.*" %>
<%@ page import="java.util.*" %>

<title>JVM Memory Monitor</title>
<%
Iterator<MemoryPoolMXBean> iterator = ManagementFactory.getMemoryPoolMXBeans().iterator();
while (iterator.hasNext()) {
MemoryPoolMXBean item = (MemoryPoolMXBean) iterator.next();
%>

<table border="0" width="100%">
<tbody><tr>
<td colspan="2" align="center">
<h3>Memory MXBean</h3>
</td>
</tr>
<tr>
<td width="200">Heap Memory Usage</td>
<td>
<%= ManagementFactory.getMemoryMXBean().getHeapMemoryUsage()%>
</td>
</tr>
<tr>
<td>Non-Heap Memory Usage</td>
<td>
<%= ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage() %>
</td>
</tr>
<% } %>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2" align="center">
<h3>Memory Pool MXBeans</h3>
</td>
</tr>
<%
Iterator<MemoryPoolMXBean> iter1 = ManagementFactory.getMemoryPoolMXBeans().iterator();
while (iter1.hasNext()) {
MemoryPoolMXBean item = (MemoryPoolMXBean) iter1.next();
%>
<tr>
<td colspan="2">
<table style="border: 1px solid rgb(152, 170, 177);" border="0" width="100%">
<tbody><tr>
<td colspan="2" align="center">
<b><%= item.getName() %></b>
</td>
</tr>
<tr>
<td width="200">Type</td>
<td>
<%= item.getType() %>
</td>
</tr>
<tr>
<td>Usage</td>
<td><%= item.getUsage() %></td>
</tr>
<tr>
<td>Peak Usage</td>
<td><%= item.getPeakUsage() %></td>
</tr>
<tr>
<td>Collection Usage</td>
<td><%= item.getCollectionUsage() %></td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<% } %>
</tbody></table>

IT 2010

0

Posted by Jagadeesh VP | Posted in

According to the statistics given by various organizations and corporates, total population if IT field in India will raise up to 20%. In this 20% the major portion will be filled by campus recruitment and by freshers (including 1+).

So guys prepare for war. It won't be a smooth ground for us...

Indian employees most passionate about their jobs

0

Posted by Jagadeesh VP | Posted in , , ,

72 percent of Indian employees say that they are passionate about their jobs when their skills and abilities are put to good use; the company supports work/life balance; they have confidence in the company's future; they have the opportunity to improve their skills; and they are recognized for their work.

Employees in Brazil (63 percent), Canada (60 percent), and the United States and Germany (59 percent) report the most passion followed by those in Saudi Arabia and Russia (58 percent). Workers in Japan (41 percent) are the least likely to feel passionate. With Valentine's Day right around the corner, the Kenexa Research Institute (KRI), a division of Kenexa, a global provider of business solutions for human resources, conducted a survey on "What makes an employee passionate about his/her job?" which says that globally, 56 percent of surveyed employees feel passionate about their jobs.







Image

Having passion for one's job is defined by the extent to which employees are excited about their work, feel a sense of personal accomplishment, are extremely satisfied with their organization, believe they have a future at their organization, and rarely think about finding a new job.


Also, the intensity to which employees are passionate about their jobs varies among different jobs types. In India, clerical workers (77 percent) report the most passion for their jobs followed by supervisors (76 percent), senior/middle managers (74 percent), salespeople (72 percent) and professional/technical workers (70 percent). Service and production workers (64 percent) report the least amount of passion.

Brenda Kowske, research consultant, Kenexa Research Institute, said, "Similar to romantic passion, workers won't put up with a miserable relationship for long. As the economic outlook continues to improve, it would behoove leaders to 'play cupid.' Elevating an employee's passion for his/her job will keep employees happy and committed, even when other attractive opportunities come their way."
Src : Silicon India

JSF Validation Messages

0

Posted by Jagadeesh VP | Posted in , ,

In JSF, user defined error message can be displayed for validation.

The standard error messages that are shown for each type of validation error are controlled by the Message.properties file.
This file is placed in jsf-impl.jar.

jsf-impl.jar > javax.faces > Message.properties

We can create our own property file and use it in our application.
Eg :

javax.faces.component.UIInput.REQUIRED={0}: Validation Error: Value is required.

javax.faces.component.UIInput.REQUIRED= This field should have value.

Include your file in faces-config.xml.


<application>
<locale-config>
<default-locale> en </default-locale>
</locale-config>
<message-bundle> your.package.MyMessages </message-bundle>
</application>

JSF Bean & Bean Constructor

0

Posted by Jagadeesh VP | Posted in

Using constructor in bean class will make all the references from faces-config.xml to null.
This throws the exception.

But for some bean constructor in necessary for initialization.

This problem can be avoided by using @PostConstruct annotation.

Eg:

public MyBean(){
someMethod();
}
the above constructor can be replaced by

@PostConstruct
public void myBeanMethod(){
someMethod();
}

The method defined with this annotation will be called immediately after finishing the construction of Bean object.

Note : This annotation won't works in JSF 1.1

Quotes

0

Posted by Jagadeesh VP | Posted in

"All that is valuable in human society depends upon the opportunity for development accorded the individual."

Anyone who doesn't take truth seriously in small matters cannot be trusted in large ones either.

Albert Einstein


"So in the Sun world, the hard stuff is possible, but the easy stuff is hard. In the Microsoft world, the easy stuff is easy, but the hard stuff is impossible."

James Gosling