Skip to main content

Posts

Showing posts from August, 2012

Skeleton Project with Spring and Hibernate

Skeleton Project with Spring and Hibernate I have done with construction of a skeleton Project using spring and hibernate as base Technologies. Using this skeleton it is easy to extend and build real projects. In fact it is construct over a proven arhitecture with minor optimizations and small modifications according to my flavor.   Slighly modified versions that are using compile time weaving and load time weaving instead of interface proxies can be found at these links: ltw and ctw : Versions of libraries used are listed below: ·          hibernate:jar:3.2.0.ga ·          hibernate-jpa-2.0-api:jar:1.0.0.Final ·          hibernate-annotations:jar:3.2.0.ga ·          org.springframework:spring-orm:jar:3.0.5.RELEASE ·          org.springframework:spring-tx:jar:3.0.5.RELEASE ·          spring-core:jar:3.0.5.RELEASE ·          spring-aop:jar:3.0.5.RELEASE ·          c3p0:jar:0.9.1.2 ·          log4j:jar:1.2.9 ·          mysql-connector-java:jar:5.1.15

Using Spring Declarative Transaction With Compile Time Weaving

Using Spring Declarative Transaction With Compile Time Weaving It is virtually imperative to use declarative transaction management in aspectj mode if you want to invoke a transactional method of an object from another of its functions, which may be named as self invocation. In case of self invocation method invocations will not be intercepted by spring created Proxy objects thus a new transaction won’t be started.  For more information you may refer to related spring document . In a previous blog I showed how to achieve binary code weaving during load time. In this particular blog entry I will deal with compile time waving. Required Configuration If you are already using LTW, from configuration perspective there is very little difference between two approaches. To disable LTW, just remove the following definition from your application context file. <context:load-time-weaver/> Besides -javaagent argument is no longer needed when launching JVM. To enable

Using SyntaxHighlighter to Show Code Snippets in Blogger

Update: I no longer support the use of SyntaxHighligter. I would rather suggest the use of gists provided by GitHub. It is easier to use. Give it a try. https://gist.github.com/ Using SyntaxHighlighter to Show Code Snippets in Blogger I have found out a way to display code snippets with syntax colouring. There is a very nice yet useful tool consisting of a small set of js and css files: SyntaxHighlighter .  Required files can be found at project site.  After downloading files we will need to store them in an online location to refer them from our blog pages. At this point  Google Sites  proves to be useful. Just create some pages and upload SyntaxHighlighter files. So that we can refer them from blogger pages. Usage:  Add lines below to blogger page. Just remember to add all brush files you need. For a list of all available brushes see  related page. <script type="text/javascript" src="https://sites.google.com/site/your_site_path/sc