Results 1 to 6 of 6

Thread: Implementation of org.springframework.aop.framework.AopProxy with Javassist

  1. #1
    Join Date
    Sep 2009
    Posts
    5

    Default Implementation of org.springframework.aop.framework.AopProxy with Javassist

    Hello Community

    I was trying integrate Javassist into Spring, and I have one prototye.
    I need this implementation because my environment Hibernate uses only Javassist and I need to proxy classes without interfaces. (I dont know if Javassist can proxy the class target itself)

    Then, I attached the jar file together with the source and I need your help for improve this prototype.

    Thanks!!
    Attached Files Attached Files

  2. #2
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    Why don't you use cglib for proxying concrete classes?

  3. #3
    Join Date
    Sep 2009
    Posts
    5

    Default

    Hi Denis
    Because my Hibernate uses only Javassist and I need to proxy classes without interfaces.

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    First I think your code is flawed in the case of multiple interceptors (you recreate the proxy loosing the previously registered interceptor if I'm right). Next I would use the already available infrastructure and not create your own Invocation interface and implementation etc. (reuse the ones from the aopalliance that way it also integrates nicer).

    Write some tests, when finished submit to JIRA
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    org.hibernate.bytecode :
    ...
    Currently, both CGLIB and Javassist are supported out-of-the-box.
    ...
    Javassist is selected by default.

    Googling shows that you can define target bytecode provider via 'hibernate.bytecode.provider' property.

    So, there is no necessity to use javassist only.

  6. #6
    Join Date
    Sep 2009
    Posts
    5

    Default Little release

    Hi Guys:

    I am attaching the final release of javassistProxy integrated in spring aop framework. I am also attaching the unit tests, it passed almost the 99%.
    it's only remaining the performance issues.

    cheers!
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •