Posts

Showing posts from February, 2016

Featured Post

git commands list

# Create a repo on github then call the below #git remote add origin  https://github.com/srampv/CounterWebApp.git #git push -u origin master ############################## #                Common cmds             # ############################## git add .                                                                # Stage all new & mod files from . git add -u                           ...

hibernate versioning

Versioning & Optimistic Locking in Hibernate By Jim White+ June 23, 2010 Java 18 Comments 1 Star2 Stars3 Stars4 Stars5 Stars By Jim White (Directory of Training and Instructor) A few weeks ago while teaching Hibernate, a student (thanks Dan) asked me about whether version numbers can be generated by the database. The answer is â€" Yes, in some cases. I thought the question and an expanded discussion of Hibernate’s versioning property would be a good topic for this week’s blog entry. The <version> property (or @Version annotation) For those of you that use Hibernate today, you are probably aware that Hibernate can provide optimistic locking through a version property on your persistent objects. Furthermore, the version property is automatically managed by Hibernate. To specify a version for your persistent object, simply add a version (or timestamp) property in your mapping file and add a version attribute to your persistent...

REST advantages over SAOP

REST is easier to use for the most part and is more flexible. It has the following advantages when compared to SOAP: No expensive tools require to interact with the Web service Smaller learning curve Efficient (SOAP uses XML for all messages, REST can use smaller message formats) Fast (no extensive processing required) Closer to other Web technologies in design philosophy

SOAP vs REST

Soap Vs Rest SOAP is definitely the heavyweight choice for Web service access. It provides the following advantages when compared to REST: Language, platform, and transport independent (REST requires use of HTTP) Works well in distributed enterprise environments (REST assumes direct point-to-point communication) Standardized Provides significant pre-build extensibility in the form of the WS* standards Built-in error handling Automation when used with certain language products

SOAP vs REST

Simple Object Access Protocol (SOAP) and REpresentational State Transfer (REST) are two answers to the same question: how to access Web services. The choice initially may seem easy, but at times it can be surprisingly difficult. SOAP is a standards-based Web services access protocol that has been around for a while and enjoys all of the benefits of long-term use. Originally developed by Microsoft, SOAP really isn̢۪t as simple as the acronym would suggest. SOAP and REST Basics soapUIREST is the newcomer to the block. It seeks to fix the problems with SOAP and provide a truly simple method of accessing Web services. However, sometimes SOAP is actually easier to use; sometimes REST has problems of its own. Both techniques have issues to consider when deciding which protocol to use. Before I go any further, it̢۪s important to clarify that while both SOAP and REST share similarities over the HTTP protocol, SOAP is a more rigid set of messaging patterns than R...

Building Simple Proxies using JAVA 8

Building simple proxies In the previous post I introduced Java dynamic proxies, and sketched out a way they could be used in testing to simplify the generation of custom Hamcrest matchers. In this post, I̢۪m going to dive into some techniques for implementing proxies in Java 8. We̢۪ll start with a simple case, and build up towards something more complex and full-featured. Consider an instance of java.reflection.InvocationHandler that simply passes every method call through to an underlying instance: public class PassthroughInvocationHandler implements InvocationHandler { private final Object target; public PassthroughInvocationHandler(Object target) { this.target = target; } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return method.invoke(target, args); } } To create a proxy using this invocation handler, we use the newProxyInstance static utility method on the java.reflection.Proxy class: @Sup...

Spring AOP designators

there are three types of designators in AOP kinded designator scoping designator contextual designators Kinded Designators : -----> execution,get,set,call,handler scoping Designators:-----> within,withincocde Contextual Designators :-----> this,target, @annotation I hope this post helps alot . @Happy Reading Thanks Venkata Sitaram P Teknosys.in.

Aspect Oriented Programming

Image
10. Aspect Oriented Programming with Spring Part III. Core Technologies   Next 10. Aspect Oriented Programming with Spring 10.1 Introduction Aspect-Oriented Programming  (AOP) complements Object-Oriented Programming (OOP) by providing another way of thinking about program structure. The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the  aspect . Aspects enable the modularization of concerns such as transaction management that cut across multiple types and objects. (Such concerns are often termed  crosscutting  concerns in AOP literature.) One of the key components of Spring is the  AOP framework . While the Spring IoC container does not depend on AOP, meaning you do not need to use AOP if you don’t want to, AOP complements Spring IoC to provide a very capable middleware solution. Spring 2.0 AOP Spring 2.0 introduces a simpler and more powerful way of writing custom aspe...