Ad

Friday 14 May 2010

Initial Context(JNDI) lookup from one weblogic to another weblogic

There may be scenarios where we may deploy our webapplication in one weblogic server and may use the EJB or the destination objects(Queue/Topic) deployed in other weblogic.In order to use this remote resource When we try to get the Initial context of the weblogic2 from the webapplication in weblogic1,we will not get the connection if any of the below unique requirements fails

(1) The WLS server name should be unique in both the weblogic servers.
(2) The Domain Name should be unique in both the weblogic servers.
(3) For messaging(Connection factories and topic/queue) lookup,the JMS Server Name
and the queue/topic name should be unique in both the servers

Saturday 8 May 2010

Difference between consumption paused and production paused in weblogic JMSDestinationRuntimeMBean

We can programmatically pause a queue in weblogic by using Mbean JMSDestinationRuntimeMBean.
The methods Mbeans provide for this are pauseConsumption() and pauseProduction()

Pause Production
The queue can be production paused as shown below:

Destination queue = (Destination) context.lookup("queue JNDI name");
weblogic.management.runtime.JMSDestinationRuntimeMBean destBean = weblogic.jms.extensions.JMSRuntimeHelper.getJMSDestinationRuntimeMBean(
context, queue);
destBean.pauseProduction(); //Will pause the queue

If the sender try to send the message to the above paused queue,it will get an exception.Then if the queue is resumed(resumeProduction()),the previous sent messages are lost.

Pause Consumption:
The queue can be consumption paused as shown below:

destBean.pauseConsumption(); //Will pause the queue                                                                             

The sender of the queue can able to send message to the above queue,but the receiver can't get the message as the queue is consumption paused.once the queue is resumed(resumeConsumption()),the previous sent messages are not lost and will be received by the receiver.

Friday 2 April 2010

Privacy Policy

If you require any more information or have any questions about our privacy policy, please feel free to contact us by email at magesh.varalakshmi@gmail.com.

At http://letslearnjavaj2ee.blogspot.in/, the privacy of our visitors is of extreme importance to us. This privacy policy document outlines the types of personal information is received and collected by http://letslearnjavaj2ee.blogspot.in/ and how it is used.

Log Files
Like many other Web sites, http://letslearnjavaj2ee.blogspot.in/ makes use of log files. The information inside the log files includes internet protocol ( IP ) addresses, type of browser, Internet Service Provider ( ISP ), date/time stamp, referring/exit pages, and number of clicks to analyze trends, administer the site, track user’s movement around the site, and gather demographic information. IP addresses, and other such information are not linked to any information that is personally identifiable.

Cookies and Web Beacons
http://letslearnjavaj2ee.blogspot.in/ does use cookies to store information about visitors preferences, record user-specific information on which pages the user access or visit, customize Web page content based on visitors browser type or other information that the visitor sends via their browser

To Pause/Start the Queue programattically in weblogic(using JMSDestinationRuntimeMBean)

one can puase or start the queue deployed in weblogic by using the admin console.But sometimes we may require to do this programmatically.Weblogic provides the API JMSDestinationRuntimeMBean for doing this.


Destination queue = (Destination) context.lookup("queue JNDI name");
weblogic.management.runtime.JMSDestinationRuntimeMBean destBean = weblogic.jms.extensions.JMSRuntimeHelper.getJMSDestinationRuntimeMBean(
context, queue);
destBean.pauseConsumption();   //Will pause the queue
destBean.resumeConsumption();   //Will start the paused queue again

Tuesday 26 January 2010

plugins not working in eclipse


Very often we will be adding the plugin to the eclipse,by manually copying plugins folder under the eclipse home folder.But the newly added plugin might not reflect in the eclipse.This is due to the fact that the configuration for the eclipse needs to be refreshed,when we make any changes to the plugins.The configuration can be refreshed by passing the argument while starting the eclipse like below.In the Command prompt go to the eclipse home folder and enter the below command to open the eclipse with the newly added plugin.

eclipse.exe -clean

Monday 25 January 2010

To make webapplication or any administered objects deployed in jboss accessable from remote client

By default Jboss always listens to localhost.Hence we cannot access the application or any administered objects deployed in Jboss remotely.To enable the access remotely pass the argument like below while starting the server:

run.bat -b 0.0.0.0

Note:
If you added the server to the eclipse,alternatively do the following steps to enable the remote access:
(1)Double click the jboss server in the server window to open the server settings
window.
(2)Click the open launch configuration link in the server settings window
(3)Navigate to arguments tabs and in the program arguments enter -b 0.0.0.0