Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model is explained in this article. Point to Point Messaging Model and Publish Subscribe Messaging Model are the two different messaging paradigms supported by Java Message Service (JMS). These messaging paradigms are programming models that support asynchronous way of messaging between diverse systems. Listed below are the differences between Point to Point Messaging Model and Publish Subscribe Messaging Model is explained in this article. Point to Point Messaging Model and Publish Subscribe Messaging Model: Point to Point Messaging Model Publish Subscribe Messaging Model JMS Destination is Queue JMS Destination is Topic JMS Producer is called as Sender JMS Producer is referred as Publisher JMS Consumer is called as Receiver JMS Consumer is referred … [Read More...] about Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model
Main Content
Spring dependency injection with Java configuration
Here we are going to see how to configure dependency injection in spring with java . In the below example we have two classes MyClass and Myclass2 .There is a dependency of MyClass2 in Myclass . So lets understand how to inject the depended class into another using Spring.
1 2 3 4 5 6 7 |
public class MyClass { MyClass2 myClass2; MyClass(MyClass2 myClass2){ this.myClass2=myClass2; } } |
1 2 3 4 5 6 |
public class MyClass2 { MyClass2(){ System.out.println("Initializing MyClass2"); } } |
Below is the configuration […]
Callable and Future Interface
Callable and Future Interface : Callable and Future interface has been introduced in JDK 1.5 under java.util.cocurrent package. Callable interface is used to execute task and is similar to Runnable interface but can return value to caller and is able to throw checked Exception as well .Callable interface has call() method to execute task, computing […]
Java Regular Expressions
Java regular expressions are unique series of characters, which assists in matching or locating other strings or collection of strings, with a unique syntax applied in a pattern. Java offers a regex package for matching with regular expressions. The java.util.regex package mainly is composed of 3 classes. Pattern Class A Pattern element is a compiled form of a regular expression. … [Read More...] about Java Regular Expressions
Method Local Inner Class in Java
Method local inner class in Java is limited to a code section, and it can be processed only inside the same code section it is declared in. Hence it can never execute modifiers. A local inner class instance can be delivered as argument and retrieved from methods, and is available inside a valid scope. Purpose of Method Local Inner class The only limitation in method local inner class is … [Read More...] about Method Local Inner Class in Java
URL Processing in Java
Uniform Resource Locator (URL) signifies a source on the WWW (World Wide Web). A URL can be split up into protocol (http, https, etc), host (authority), port, path (filename), reference and query. URL Processing in Java is done using two classes namely URL Class and URLConnection class. URL Class The java.net.URL class includes a collection of methods to operate URL in Java. The URL class … [Read More...] about URL Processing in Java