Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Anand Loni

Ranch Hand
+ Follow
since Jan 20, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Anand Loni

Finally I resolved this issue.

I added shutdown hook and stopped DMLC. This hook will be called when jvm exits.

Here is code :



Thanks.
10 years ago
Yes.. pKey.getKey() returns String. I don't know the value retrieved from database. But I am sure that database value is same as value entered from UI, as I checked production database table.
10 years ago
Hi Fatih,

We have 7 single char text boxes on the UI, when user enters value in those and clicks on submit, we are concatinating 7 chars from text boxes and sending those to service. Service will validate this 7 chars string with string from database, if it matches then validation is successful and user is allowed to proceed further.

Here is code snippet from action class:



I hope I am able to explain my problem.

Regards,
10 years ago
Hello,

I have a table which stores 7 chars string key which will be read by application for validation. The problem I am facing is, I am not able to validate key if it contains alphanumeric and special characters (example: oFemT7M). If I change key to all numeric say 1111111 then validation works fine.

Is this related to character encoding or something else ? I checked my prod database with dev and only difference I can see in time zone. Prod database has timezone as America and Dev database is having Asia.

Any idea what could be the issue ?

Regards,
10 years ago
Hi Bruce,

Is there any way, by which I can check if there is any subscriber with the same client Id. If its there then destroy that subscriber and start subscriber again.

I tried to implement my class implementing disposable bean and in the destroy method I called stop method on the DMLC. But when I stop server, destroy method is not called at all.

Any idea, how I can resolve this issue ?

Regards,
10 years ago
Hi Bruce,

When I looked up into my JMS server, I found that there is active connection for TCAnsPaperSubscriber471. When I destroy connection and then start my weblogic server where I deployed my application, I do not get "Client id in use" error. When Application gets up I can see active connection for TCAnsPaperSubscriber471. If I restart weblogic server again without destroying connection then I get the same error "Client Id in use".

Is this related to autoStartup property being false for DMLC ? If yes how can I destroy connection when my application/server goes down?

Regards,
10 years ago
Hi Bruce,

Sorry, but I am not getting where client id is being used twice from the error message.

Regard,
10 years ago
Hi Bruce,

I have made property autoStartUp as false for my listeners, and I am starting DMLC in my context loader. I am using weblogic as application server. Now I am getting below error:




I made sure that client Id and subscription name are unique for each listener. Any idea what went wrong ?
10 years ago
Hi Bruce,

Thanks for the quick reply.

My TCDataSubsciber implements javax.jms.MessageListener.

When I stop JMS server application throws exception saying Destination Unreachable. When I start JMS server again I can not see the DMLC created threads running.
How to test if DMLC tries to reconnect ?

Regards,
Anand
10 years ago
Hi,

Here is the problem I am facing.

I have topic connection factory.



This is working fine, When server is available I am able to publish message and in case if its not available it throws error.

I have two other subscribers which are listening to topic. As I have made lookupOnStartup property false for my topic and connection factory, listeners are not starting at all.

Here is topic and listener configuration.



Any idea, how listeners can be started ? I tried to lookup listener bean and calling start method, but no success.

Regards,
Anand
10 years ago
Hi,

I am using spring-3.0 with quartz-1.6.3.

Quartz job runs fine, but stops running after some time. There are no errors or exceptions thrown.

Here is my code




Any idea, why job stops running ??
11 years ago
Issue is now resolved..

Problem was " in the properties file.

Thanks
11 years ago
Hi,

PropertyPlaceholderConfigurer is not able to read properties with '/' in it.

Here is my code:


here is properties file contents:



Other properties are read properly. Any Idea about the issue ?

I am using Spring 3.0.0.

Regards,

11 years ago
Hi,

I am working on the JMS and while deploying application I am getting below error

No known valid port for: 'Default[t3]:t3(t3):192.168.2.166:7001:null:-1'; No available router to destination

I have JMS server running on 192.168.2.169:80 in my local network.

Below is error log


Any help on this would be appreciated.

Thanks,

11 years ago
Hi,

In my web application, I need to access property file located in weblogic domain. (<domain>/config/weblogic.properties)

Here is my code



I am getting file not found error. Any Idea how can I read file properly.

Thanks,
11 years ago