Anoop Nair

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

Recent posts by Anoop Nair

Figured out the issue.

The 2nd approach works. The issue was with my invocation of the deleteAllQueuedMessages message. The method takes a boolean argument which indicates the messages should be moved to the Exception Destination. I was not passing this argument !!!

I corrected the implementation as below and it works now.
Hi All,

I want to delete all the messages in a queue configured in Websphere 8.5 SIB. Below are two approaches I tried, but none of them seem to be working and each throws a different exception. Can someone please advise on what is the correct way to achieve this.

Approach 1

This approach throws the below exception.

javax.management.InstanceNotFoundException: WebSphere:type=SIBQueuePoint,name=jms.queue.MY_QUEUE



Approach 2

This approach throws the below exception

javax.management.ReflectionException: Target method not found: com.ibm.ws.sib.admin.impl.JsQueuePoint.deleteAllQueuedMessages

Solved the issue. I wrote a message reciever for the queue with messageId as the selector.

I am writing an API to delete messages from Jboss service integration bus. I need to provide methods for deleting individual messages and also all the messages (purge) in the queue.

I tried finding the list of operations available on a queue using JMX. Below is the code I used for getting the list of operations. It has an operation "removeAllMessages" which would delete all the messages in the queue. However, I did not find any operation that would help me delete individual messages from the queue. Also, I found the QueueBrowser API of JMX. But the specification says that the class does not delete messages from the queue.


Please let me know how I can delete individual messages from the queue.
Thanks Mark.

That works perfectly now.

Although, I still do not understand why it was throwing an exception when the aop config was present in the same file.
13 years ago
Hi All,

I have a Spring 3.0 MVC application that works fine. I want to introduce AOP in this application. However on doing this I am getting the below exception.



Below is the application code:

Controller


Model interface and implementation:







Can someone please point out what I am doing wrong with this ??
13 years ago
Hi All,

I have a web service client. I am using Axis 1.4.

I want to setup the connection timeout interval in my client. Can someone tell me how I can do this?

Also, I want to handle the timeout exception that is thrown so that I can redirect it to an appropriate handler.
13 years ago
Hi All,

I have a webpage in which there is a "Save" button, which is supposed to save the entire page in PDF format.
The webpage has images, text and also CSS.

I tried using flying saucer and iText. However when using this, the background images (done via CSS) are not coming in the PDF file.

Below is the code I am using. Is there a better way to do this where the entire page can directly be converted to PDF format.



Thanks Peter,

There was indeed a firewall issue. Seems like the IP and port combination was not open.

Personally, I would not mix the two methods, nor would I bind any server to 0.0.0.0 when using multiple IP address. In other words, I would either:

a) bind every server to 0.0.0.0 and use different ports
b) bind each server to its own distinct IP address (each using the same ports) - this option requires a separate physical IP address for each server


My requirement is that only one of the servers should be listening on both the IPs, the others shouldnt be. Could you please point me to some article so that I can understand this ?
14 years ago
When running DF2 with -b <IP2>, on stopping the server I get the following exception:


Exception in thread "main" javax.naming.NameNotFoundException: jmx not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:581)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:589)
at org.jnp.server.NamingServer.getObject(NamingServer.java:595)
at org.jnp.server.NamingServer.lookup(NamingServer.java:313)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.Shutdown.main(Shutdown.java:214)



14 years ago
Thanks Jaikiran and Peter for your responses.

I am using JBoss AS 4.3 on Linux.

Three JBoss instances are running on the same system on different ports. The system has two IP addresses, IP1 and IP2. Ex. IP1 = 1.1.1.1 and IP2 = 2.2.2.2.

Instance1 is a clustered server (CL1). The binding 0.0.0.0 works with this one. The other two are instances of the default server (DF1 and DF2). The binding works for one of the default servers (DF1).

After starting DF2 when I do http://2.2.2.2:8080, the console doesnt come up. However, if I do http://1.1.1.1:8080 it comes up.

The server is started using run.sh command with the below arguments
-Djboss.server.log.dir
-Djboss.server.base.url
-Djboss.server.base.dir
-b 0.0.0.0

I am not able to figure out what could be the difference in the configuration of the two default servers.

I also tried running DF2 with -b IP2.
However, this also doesnt work. In this case the console doesnt come up on doing trying IP1 as well, which was expected.
14 years ago
Hi All,

I had previously posted here to know how I can make JBoss listen on two IPs.

I tried that and it worked. However, when I try the same thing on another JBoss instance it doesnt work.
The only difference I noted was that the first one was a clustered server whereas the second one is a default server.

Am I missing something here ?
14 years ago
Thanks Jaikiran.

I have made the server listen on 0.0.0.0 now.
14 years ago
Hi Jaikiran,

Thanks for your reply.

I tried this. But it overwrites the IP specified in bind.address.
And so it listens only on the IP specified by -b.
14 years ago
I tried setting the run parameter bind.address.
If I set it to 0.0.0.0, it works. But then it listens to all the IPs of the system. Run Parameters Explained

Is there a way to specify specific IP address ?

14 years ago