saran sadaiyappan

Ranch Hand
+ Follow
since Dec 23, 2004
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 saran sadaiyappan

Thanks Peter. Yeah..thats not a compatible code but I just put the essence of my question in that. So by your answer my understanding is that, if I print it to a stdOut or stderr then a new thread will be started.Rite?
Hi all,
Assume I have a piece of code like
try {
some process handled by a Thread1
}catch(){
e.printstacktrace();
}
I want to know whether the stack is printed by Thread1 or a seperate thread
Hi all, I am facing a problem while retrieving a message from database and showing it in the text area. If the message does nt have any spaces then it comes in a single line for the entire length which quite distorts the alignment of my jsp page. Any suggestions as how to read texts from db and wrap them in the jsp? I have used nowrap="false".But it never worked out.

Also while testing the application I found that if I enter without any spaces in between them, and on clicking the submit button the page does nt get submitted but it aligns itself horizontally for the entire length of the message, and only on clicking again it gets submitted.
17 years ago
JSP
Hi all,
I am writing a query to fetch records based on some condition. Instead of putting a where clause can I put a concat operation for the condition and join them and execute as a single condition ?
Which is the more efficient one ?

E.g.
Instead of using

select * from table name where column1 ='21'
and column2 = 'TEST'

can I use

select * from table name where concat(concat(column1, ' '),column2)='21 TEST')

I would also like to know how the DB will execute this query internally.
I dont think its related to reading them. But the problem is with loading them. Anyways I did it..still the same
Hi,
I have written a client to call a session bean. I am loading the initial context and provider url as

-Djava.naming.factory.initial=org.jnp.interfaces.NamingContext
-Djava.naming.provider.url=http://localhost:8080

But I get a exception as,

javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContext [Root exception is java.lang.InstantiationException: org.jnp.interfaces.NamingContext]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at slsb.CounterClient.main(CounterClient.java:30)

But I have loaded the jar file jnp-client.jar in the classpath. ANy idea why this happens?
Hi all,
I am new to jbpm and I am writing a pilot module in it. I would like to know how can I retrieve the variables that I give in my user page. I am having a login page where I give certain values and then I need to retrieve the same in my actionHandler . How can I do this ?
17 years ago
Hi all,
Recently I was coding for streaming a file from a location .I stored the stream as byte array to pass it to the calling method. But I later found tht, even if you pass the stream as such, it works well though u close your stream in the called method.

Does nt closing the stream closes the data? what it does? I went through the java file and found that it was an empty method? Does it has something to do with JVM related stuff?

Answers would be appreciated.
17 years ago
Hi all,
I am aware that a remote exception thrown when some problem happens over the network, that we are trying to connect. But when I shut down the remote server I get a javax.naming.CommunicationException rather than a remote exception.

How can I replicate the remote exception as I want to display user frendly messages for those kind of exceptions.
Hi all,
I have deployed a war file which contains a delegate to a session Facade. I have a servicelocator to find the sessionfacade and i am giving the provider URL as the ear machines URL. But still I am getting a class not found exception for the sessionBean.

Any idea how to solve this?
Hi all,
I have read that static final objects is not a recommended usage in EJBs as it would pose inconsistency in clustered environments. But I am grey with what it really means. Can anyone explain it clear?
Hi all,
Thanks for all your valuable feedback. I came to know about what is a business delegate object and I will implpement the same.
Hi all,
I have an application which used jsps ans servlets as web layer and POJO as business layer and DAO s as data base layer.

Now the question is, if I want to redesign this using EJBs how ll I do? I will retain the JSP pages as such and populate a DTO from the JSP inputs, call a session bean in the servlet for performing all business logics, and an entity bean will be used for doing the data base updates.

Is this design Ok?
I have a doubt whether I can use servlet to call a session bean. Any better design or suggestions?
Hi all,
I am running a application which ll be processing 2 lakh docs per day.Roughly 3 docs per second.I am doing a database updation for all these docs.But if two docs are sent with a same id(unique) then it shd throw an error.As of now if i am sending such high volumes in short interval then the concurrency issue occurs.

Whn the first doc is being processed ,the second doc with the same id is also being processed successfully as the first transaction has not performed a commit at the time of second thread s reading.

How can I overcome this issue?
Hi all,
when i put

final String s = "Java";
HashMap m = new HashMap();
m.put(s,"Java1");
m.put(s,"Java2");
System.out.println(m.get(s));//prints Java2

What i am not clear is how a final variable has been reassigned?Is that the object s reference alone changes and the object by itself is final?