Manikandan Parthasarathi

Greenhorn
+ Follow
since Jul 29, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Manikandan Parthasarathi

I am trying to build a java application using ANT and also validating my code with Findbugs.

I want to stop my build if my code has a particular violations reported by Findbugs.

Is it possible to achieve the above using ANT & Findbugs?

Thanks for your support.
11 years ago
We have a Java/J2EE enterprise application which gets details from backend systems via webservice. The webservice have their own data model.

My question is

1. Is it a good practice to use the AS-IS data model retrieved from the webservice response?
2. Or to have our own data model and map the details retrieved from response?

could you please help me with the above?

P.S. we will use 40-60% of the data retrieved from the webservice response.
12 years ago
Hi

I just cleared SCWCD with 95%
Thanks to to all
14 years ago
javascript function:

HTML code in an anchor tag:

After the completion of page loading, when i click the link for the first time it doesn't work.
But when i click the link for second time, it works expected.

Can anyone help me in sorting out this issue?
hi
Thanks for reply. I am very new and i dont know much about Apache. Can you tell me more precisely ?
14 years ago
hi can anyone tell me the difference between Apache 2.0 and 2.2
14 years ago
Can anyone give me a example for parsing self closing tags using SAX processor in java
Thanks in advance
hi
i am using ajax with Spring Servlet for loading. i have to get the response from servlet in turn the servlets forwards the request to another servlet which is another war. as soon as the servlet forwards ajax gets the response but not from the another war. how to handle this?
i am getting the following value 1221719820863, and i am not getting the same value every time.

i am using following code to convert it into time format
public String convert(long time) {
int milliseconds = (int) (time % 1000);
int seconds = (int) ((time / 1000) % 60);
int minutes = (int) ((time / 60000) % 60);
int hours = (int) ((time / 3600000) % 24);
String millisecondsStr = ((milliseconds < 10) ? "00"
: ((milliseconds < 100)
? "0" : "")) + milliseconds;
String secondsStr = ((seconds < 10) ? "0" : "") + seconds;
String minutesStr = ((minutes < 10) ? "0" : "") + minutes;
String hoursStr = ((hours < 10) ? "0" : "") + hours;

return new String(hoursStr + ":" + minutesStr + ":" + secondsStr + "." +
millisecondsStr);
}


but i want server time to be synchronized with the regional time
15 years ago
I didn't get you...
15 years ago
i am getting the time by this msg.getJMSTimestamp(). It returns a long which is a milliseconds. i conver that milliseconds into actual time.
15 years ago
hi frens
i am using EJB 3.0 and Jboss 4.2.2GA in windows xp system.
i am inserting a record using entity bean in HSQL database provided by the JBoss. The problem is when i stop the server the inserted rows are lost, but autocommit is set to true. how i can overcome this problem
Hi
I am sending a message to jms.queue.
I am reteriving the time from the server.
But its not the actual time. when ever i restart it shows oo.oo.oo
i want the time to be actual system time

i am using EJB3.0 and JBoss 4.2.2
how i can set the regional time?
15 years ago
MessageBean.java

//Required Imports
@MessageDriven(activationConfig =
{ @ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination",
propertyValue="jms/queue")})
public class MessageBean implements MessageListener {


public void onMessage(Message msg) {
TextMessage tmsg = null;

try {
tmsg = (TextMessage) msg;
System.out.println(tmsg);

System.out.println("The onMessage() is called");
} catch (Exception e) {
e.printStackTrace();
}


}
}

MsgClient.java
//Required Imports

public class MsgClient {
Queue jmsQueue = null;
QueueConnectionFactory factory = null;
QueueConnection connection = null;
QueueSession session = null;
QueueSender sender = null;
TextMessage message=null;
public void createConnection(){

try{

InitialContext ctx = new InitialContext();
jmsQueue = (Queue) ctx.lookup("jms/Queue");
factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
connection=factory.createQueueConnection();
session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
sender=session.createSender(jmsQueue);

}catch(Exception e){
e.printStackTrace();
}


}
public void sendMessage() {

try {
message = session.createTextMessage();
message.setText("***HI***");
System.out.println(message);
sender.send(message);
System.out.println("Sending message");
session.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}

MessageClient.java

import javax.annotation.Resource;
@Resource(mappedName = "jms/Queue")
public class MessageClient {


public static void main(String[] args) {
MsgClient msgcon = new MsgClient();
System.out.println(msgcon.connection);
System.out.println(msgcon.session);
System.out.println(msgcon.sender);
msgcon.createConnection();
msgcon.sendMessage();
}
}


Hi friends the above are my code i am trying to send a simple message to the receiver through jms queue. i am using jboss4.0 version. the error i am getting is

null
null
null
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.cts.msg.MsgClient.createConnection(MsgClient.java:23)
at com.cts.msg.MessageClient.main(MessageClient.java:15)
java.lang.NullPointerException
at com.cts.msg.MsgClient.sendMessage(MsgClient.java:38)
at com.cts.msg.MessageClient.main(MessageClient.java:16)



Please Help Me........Thanks in Advance
hi i can't find the exact one. Can you give me the links?

Thanks in Advance