How to sort an array in perl

Sorting an array is an important function and some or most of the languages provide an in-built function perform this operation. Perl provides this in-built functionality by means of “sort” function. Using sort function of perl an array can be sorted in both ascending and descending order. Now, let’s say the given array @array and is initialized as follows: Continue reading

Difference between forward and sendRedirect

forward and sendRedirect both method calls indicate that server is going to display a page other than the one requested. The implicit meaning of these two method calls is that the requested page/resource is going to forward or re-direct the request to another page/resource on the server due to various reasons. Here is the difference between forward and sendRedirect method calls: Continue reading

Difference between Non-Durable and Durable Subscription

Difference between Non-Durable and Durable Subscription. Non-Durable Subscription – In Publish/Subscribe messaging model of JMS, messages are retained in the Topic as long as either they are delivered to all the current/active subscribers or they are expired. Durable Subscription – There is an option in publish/subscribe model for subscribers to receive the messages that were published on the topic when they were disconnected or inactive. Continue reading

Difference between Point-To-Point and Publish/Subscribe JMS Messaging Models

Point-to-Point (PTP) and Publish/Subscribe (Pub/Sub) are two types of messaging models or messaging domains provided by JMS. Both of these have significant differences and should be used as per the application’s requirement. For instance, point-to-point messaging should be used when each message delivered by a producer should be consumed successfully by one receiver and publish/subscribe messaging should be used when each message should be consumed by zero or more receivers. Continue reading