Haris Karameh

Ranch Hand
+ Follow
since Oct 17, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Haris Karameh

So, it's client being developed/debugged in Eclipse. What do I do to get rid of the error.
11 years ago
I built ws client and it seems to be working ok, except annoying warning:
Jan 23, 2013 12:15:16 PM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

I do have activation.jar and mail.jar in build path and warning is still here. I tried moving it in hierarchy up and down, did not change a thing.
How do I fix this?
11 years ago
sorry for the confusion.
If your request.getParameter("name") contains '%' characters , they should be escaped - replaced with '\%'. Then you query will work
I see problem here:

queryTeste.append("FROM status s, fabric f ").append("s.descricao like '%"+request.getParameter("name")+"%' ")
your query misses WHERE keyword, it should be:

queryTeste.append("FROM status s, fabric f WHERE ").append("s.descricao like '%"+request.getParameter("name")+"%' ")

single % acts as wildcard %% acts as literal %, so you may want to filter value of request.getParameter("name") and make sure it does not have any '%' inside. If it does you need to prefix them with another '%' or '\%'
Yes, it is possible
Change output file with -r option
and set your where clause with -w
to get only inserts use
--all=FALSE --complete-insert=TRUE

run mysqldump --help for details
I created a custom resource environment provider with appropriate factory and everything works great.
All custom properties are marked as 'Required = false'. How do I make some of them required and is there any way to define some of them in advance with default values, so they appear in console as soon as provider is defined?
Thanks
Haris
15 years ago
Never, mind. I found out : There is a bug in version of WAS I am using (6.0.2.5) that ignores all defined listeners exept the last defined.

I made a workaround, I define only my listener, and changed the code to call ibm defined one by itself.
15 years ago
JSF
I am rather new in JSF development. I am using Rational 6/WAS Express 6.0 and am trying to implement phase-listener.
I added a classs :
package hcode.beans;
public class PhaseTracker implements
javax.faces.event.PhaseListener {

public PhaseTracker(){
super();
System.out.println("NEW PHASETRACKER CREATED");
}
public void afterPhase(PhaseEvent event) {
System.out.println("AFTER - "+ event.getPhaseId());
}
public void beforePhase(PhaseEvent event) {
System.out.println("BEFORE - "+ event.getPhaseId());
}
public PhaseId getPhaseId() {
return PhaseId.ANY_PHASE;
}
}

and changed /WebContent/WEB-INF/faces-config.xml to include
<lifecycle>
<phase-listener>hcode.beans.PhaseTracker</phase-listener> <!-- my adition -->
<phase-listener>com.ibm.faces.webapp.ValueResourcePhaseListener</phase-listener> <!-- the original entry -->
</lifecycle>

However, after publishing the app and restarting sthe server nothing happens. The listener is never loaded/called, I do not see any messages on the console or the log. What am I doing wrong ? The rest of the app works fine.
TIA ,
hk
15 years ago
JSF
Tnx Darryl,
that is what I was looking for. I do not use regex frequently .
Your solution is more elegant.
15 years ago
never mind, figured it out:
String SEP=";|\\||,";
[ October 28, 2008: Message edited by: Haris Karameh ]
15 years ago
I have this fragment of the code:
...
String SEP=";\\|,";
String q="2000|3000|1000";
String[] sp=q.split(SEP);
System.out.println(sp.length);

I expected to get a '3' as result. But I am getting '1'.
I wanted to split 'q' on '|'.
What am I doing wrong. I tried :
SEP=";|," and SEP=";\\\\|," with the same result
Tnx,
Haris
15 years ago
This is not really programming question, rather product inquiry.
I need a simple application/component which will read a messages from WS MQSeries running on Unix and put them into table hosted on MS SQL server.
Is there IBM or 3rd party product which will allow me to do this doing simple 'configuration'?
I understand it is not difficult to develop simple JAVA program to do this, but I have to use something available over the counter.
16 years ago
Thanks for the reply.
I'll try suggested. I am positive that I did not implement anything which would intentionally interrupt the tread. Maybe servlet container or some other part of WAS has to do something with it. The only thing which comes to my mind is SOAPConnection, which I did not close in the main loop.
This is kind a hard to catch because it happens only when the main part fails.
Thanks once again
In thread object instantiated in WebSphere servlet the code goes:
public status=IDLE;
public void run(){
int cnt=3;
while (cnt>0)
try {
status=BUSY;
SOAPConnection con=...
...
cnt=0;
status=OK;
}
catch(Exception x){
if (--cnt==0){
status=FAILURE;
}
else {
try {
Thread.sleep(1500);
}
catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}

Well, it is supposed to try 3 times to do the job and give up, waiting 1500ms in between tries.
Everytime it reachec sleep() it is 'Interrupted' by something right away.
What am I doing wrong and how to make it sleep?
TIA
Haris
After some digging I found the answer.
"validate()" should be called in JFrame to revaluate complete UI.
17 years ago