How to get Consumers Current and Messages Total queue parameters by uploading JSP (with java code in it) at WEBLOGIC server? -
I need parameters like congruent current and messages, from the queue table, I want to create a JSS with this kind of functionality It needs to be uploaded to the server and run on the server. As far as I got it, it would be a clean Java code inside the jsp file.
And here's the question: Do you want to put that code inside to get the necessary parameters? How do the queue parameters use Java and print them on the server? Can anyone help me?
Update: I found this code. But I do not know what is to be included instead of "123" and do I need all the properties for connection if I put JSP on the server?
Public Numeric Messaging (Nominating Expressions), {properties env = new property (); Env.put (Context.PROVIDER_URL, "http: // 123"); Env.put (Context.SECURITY_PRINCIPAL, "123"); Env.put (references. SECURITY_CREDENTIALS, "123"); Env.put (reference INITIAL_CONTEXT_FACTORY, "123"); Initial Content CTX = New Initial Contex (NV); Destination queue = (destination) ctx.lookup ("123"); JMSDestinationRuntimeMBean destMBean = JMSRuntimeHelper.getJMSDestinationRuntimeMBean (CTX, Queue); System.out.println ("count:" + destMBean.getMessagesCurrentCount ()); Instead of 123, use your general administrator server logon information:
env.put (context.providER_URL, "http: // your_host: port"); Env.put (Context.SECURITY_PRINCIPAL, "Username"); Env.put (context.SECURITY_CREDENTIALS, "password"); Env.put (reference. INITIAL_CONTEXT_FACTORY, "weblogic.jndi.linkalcontactfactor"); Initial Content CTX = New Initial Contex (NV); Destination queue = (destination) ctx.lookup ("jdi name of your queue"); This setup is how connects customers and finds JMS information and should work right inside the JSP page.
Comments
Post a Comment