Abrahim Daver

Ranch Hand
+ Follow
since Aug 06, 2004
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 Abrahim Daver

Thank you very much for the information
Hi All,

I would like to know, if I set same name for each thread created in thread pool using Thread.currentThread().setName(). Will it cause any problem?
How are threads recognized in threadpool ? by Name OR id OR ???

Thanking you in advance.
Abra
Hi There,

Can we make a thread dependent on other thread?
I mean to say, a thread can only perform a particular task, once another thread completes its task.
Is this kind of activity possible with thread management?

Thanks in advance,
Abra D.
Thanks a lot for informative responses.

Abra D.
Hello,

I am using Executors.newFixedThreadPool(5) to create Thread pool. and then use ExecutorService.submit(Callable<> to start a thread out of that.
Now my question is - once one thread has completed its task, how can we kill that thread in this scenario.


Abra D.
Thanks Lopes,That makes sense.
But what if my code is like this



I don't want to pass pReader object through startProcess method.
10 years ago
Actually I am trying to access pReader from main method as well as from other methods of class abc. Hence I have declared pReader as static at class level. Is there a way to handle this kind of scenario?
10 years ago
Hello there,
I am trying to create a singleton object. I am getting that object in the class and using it. Now, if there is an exception thrown while creating that singleton object, how can I handle that..
Please refer follwing code for better understanding of the issue-


If there is an exception thrown while getting instance of pReader, how can I handle that?

Abra D.
10 years ago
I am getting following error when I run Jboss server.

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:67)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2380)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2447)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2519)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2668)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:864)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:290)
at java.lang.Thread.run(Thread.java:595)


What could be reason for this.

Thanks,
Abra.
10 years ago
Let me explain you this way,
We have an XML (lets call it as "Base XML"), on which we want to apply an XSL to transform it into another XML(Lets call it as "Xformed XML"). The one of the data element of "Base XML" contains special characters (i.e. < OR >). In XSL when I try to fetch the value from this tag, which has special characters in it, it throws an Exception having description as "javax.xml.transform.TransformerException: The conten
of elements must consist of well-formed character data or markup". Is there a way to get those special character as it in "Xformed XML", without encoding them in "<" OR ">". Hope this clears the question. I appreciate your time and feedback on this in advance.
Thanks,
Abra
Hello,

I have a question about passing special character < , > and / while transforming XML using XSL. Can we applies CDATA for each XML tag in XSL?

Thanks for your help in advance,

Abra
Hi,

Using Struts tag, we normally refer value of bean value as
<html:text property="bean.field" name="dynaform"/>
Similarly to get value from an object containing vector holds again other objects, to retrieve first objects field value, can be written as
<html:text property ="obj1.vectorName[0].fieldName" name="dynaForm"/>

Now,in case, if a hashmap contains a vector which holds bean, how can we use above tag in that case...
I tried like
<html:text property="mapName(key).[vectorIndex].fieldName" name="dynaName" />
But it doesn't seem to be working..
Any help willbe appreciated.

Thanks,
Abra
10 years ago
Thanks Scott,

Instead of caching the data OR hitting database again, Isn't it possible to iterate a resultset multiple times?

Thanks,
Abra
Hi there,

Can someone tell me, how can I iterate resultset more than one time. As I want to use same resultset multiple times, to avoid database trip for same query.
I observed that I cannot iterate result set more than once, it sets it as null and throws null pointer exception. I am using following code





Thanks in advance.

Abra.