Messaging enables distributed communication that is loosely coupled. A component sends a message to a destination, and the recipient can retrieve the message from the destination. However, the sender and the receiver do not have to be available at the same time in order to communicate. In fact, the sender does not need to know anything about the receiver; nor does the receiver need to know anything about the sender. The sender and the receiver need to know only what message format and what destination to use. In this respect, messaging differs from tightly coupled technologies, such as Remote Method Invocation (RMI), which require an application to know a remote application’s methods.
A JMS application is composed of the following parts.
- A JMS provider is a messaging system that implements the JMS interfaces and provides administrative and control features. An implementation of the JEE platform usually includes a JMS provider.
- JMS clients are the programs written in the Java that produce and consume messages.
- JMS Destinations are Queue for a point-to-point messaging and Topic for pub/sub messaging.
- Messages are the objects that communicate information between JMS clients and destinations.
- Administered objects are pre-configured JMS objects created by a server administrator for the use of messaging clients. The two kinds of administered objects are destinations and connection factories
Continue reading ‘JMS Introduction’
A Message Driven Bean or MDB is a JMS message consumer that usually implements some message processing and/or routing logic. The bean registers interest (via deployment descriptor) in a Queue or Topic of its choice, implements MessageListener and MessageDrivenBean interface, and awaits arrival of asynchronous messages.
Does an MDB have a home or a component interface?
Messages are delivered asynchronously to a bean by the messaging service provider (e.g. IBM MQ) or an application server (e.g. JbossMQ). The bean cannot be invoked by a client and hence does not require a home or a component interface.An MDB does not have any client-visible identity or a conversational state - all the instances of the bean are treated equivalent for servicing receipt of a message. Typically, a server creates a pool of MDB instances and keep them in method-ready state. On arrival of a message, one of the instances is assigned to the client. After the onMessage() method execution, the bean is returned to the pool of available beans. The J2EE (now JEE) container essentially controls the lifecycle of such a bean. The component pooling of MDB results in more scalable applications.
Continue reading ‘JMS - Message Driven Bean’
Problem
You have to create an XML file denoting a mall with shops having products. Create a program to find the best deal on a product in the given mall. Shops carry different products at different prices.
Write your code in Java. Programs should run from command line. There is no need to develop any GUI components, unless you think we will be impressed by it!
Continue reading ‘Assignment - XML, Java’
Problem
You have been given a method int r5() which returns a number from 1 to 5. The return values are based on the following rules:
- The method returns a random number based on a random seed value (e.g. wind speed at random location at a random time)
- Each number from 1 to 5 has an equal probability of being returned
Derive a random method int r7() from r5() which returns a number from 1 to 7 and confirms to the rules above. Continue reading ‘Examples of our Technical Assignments’
In this blog, i am going to create a simple Zoom application using WPF. The Classes and controls which i will be using for this purpose are:
Control - Slider
Classes - ImageBrush
Property - Viewbox( Dependency property of ImageBrush) Continue reading ‘Simple Zoom Application in WPF’
History
The word pixel was first published in 1965 by Frederic C. Billingsley of JPL, to describe the picture elements of video images from space probes to the moon and Mars; but he did not coin the term himself, and the person he got it from (Keith E. McFarland at the Link Division of General Precision in Palo Alto) does not know where he got it, but says it was “in use at the time” (circa 1963).
The word is a combination of picture and element, via pix. Pix was first coined in 1932 in a Variety Magazine headline, as an abbreviation for the word pictures, in reference to movies; by 1938 pix was being used in reference to still pictures by photojournalists.
The concept of a picture element dates to the earliest days of television, for example as Bildpunkt (the German word for pixel, literally picture point) in the 1888 German patent of Paul Nipkow. According to various etymologies, the earliest publication of the term picture element itself was in Wireless World magazine in 1927,though it had been used earlier in various U.S. patents filed as early as 1911. Continue reading ‘Pixel dilemma and WPF’
Introduction There are various logging solutions available for .NET based applications. All these logging frameworks have certain advantages and disadvantages but all of them aim towards helping the user in identifying and solving issues with the applications when it is almost impossible to take help of other debugging and monitoring tools. This article tries to give you an overview of logging in general with a focus on log4net as one of the most commonly used logging framework for .NET applications. Continue reading ‘.NET Logging Framework’