Spring proxy jdk vs cglib

Simple version: Aspectj static weaving: do the aop at compile time using Aspectj’s own compiler: ajc. JDK Proxy: when class implements some interface. The proxy will implement every interface. It can NOT be cast to the original target class because it’s simply a dynamic proxy that happens to implement the same interface(s) as the target CGLIB:…

could not initialize proxy – no Session

All java web frameworks have one or more servlets that handle the requests. The servlet handles each request (HttpRequest) by creating a new thread that will finally produce the response (HttpResponse). The method that processes each request is executed inside this thread. At the beginning of the request processing your application should allocate the resources…

Hibernate lazy loading

Hibernate uses a proxy object to support lazy loading. Basically as soon as you reference a child or lookup object via the accessor/getter methods, if the linked entity is not in the session cache (i.e. the first-level cache), then the proxy code will go off to the database and load the linked object. It uses…

Using hibernate with GWT

We can not use DAO objects directly for GWT RPC even you implement the IsSerializable or Serializable interface. When you take an object and turn it into a Hibernate object, the object is now enhanced to be persistent. That persistence does not come without some type of instrumentation of the object. In the case of Hibernate, the…

git http proxy

Have to use proxy to check out code from github since I am in the company’s network. The way is: // Set proxy for git globally git config –global http.proxy http://proxy:8080 // To check the proxy settings git config –get http.proxy // Just in case you need to you can also revoke the proxy settings…

Subversion with Eclipse using proxy

For Subclipse plugin proxy setting  in eclipse You need to open C:\Documents and Settings\<user_name>\Application Data\Subversion\servers   Note: for windows 7 this could also be found in c:\Users\<user_name>\AppData\<Roaming\Local>\Subversion\servers In this file you need to uncomment few line under global [global] # http-proxy-host=proxy1.some-domain-name.com # http-proxy-port=80 # http-proxy-username=blah # http-proxy-password=doubleblah # http-timeout=60