Hi David,

David R. Allen wrote:
Hi Carlos,

What exactly are these proxies used for?  Why would I want to specify a proxy 
class and where exactly does this tagged value go?
This are just the proxy definition that hibernate takes for using with the CGLIB. You want to specify a proxy in order to get full advances of proxiing capabilities within hibernate.
There is a namespace property wich let you specify a default value. When trying to access objects, and the generated sql have a lot of outer-joins, you should set this property to true.
Also you can set a tagged value within a class to true or false in order to override the default value.

I may not understand CGLIB all that well.  In my case, with the Hibernate 
service on JBoss, the CGLIB optimizations are disabled since the AndroMDA 
generated classes have all the members as private (at least that's what the 
messages say in the server log file).
I am using proxies with hibernate and Jboss in an AndroMDA generated projects and it works Ok.

Nevertheless, Hibernate uses proxies for all lazy loaded collections so that 
the actual collection is not loaded until that proxy is accessed.  Are your 
proxies something different than the Hibernate proxies?
No, this property is just to enable and disable the proxies within hibernate

Carlos

Thanks,

David

On Tuesday 01 February 2005 12:18 pm, Carlos Cuenca (JIRA) wrote:
  
     [
http://team.andromda.org:8080/jira/browse/HIB-33?page=comments#action_10772
]

Carlos Cuenca commented on HIB-33:
----------------------------------

well, I think that not on all the cases, but sometimes you may want to do
it. So my idea is to have a namespace property to use as default, and a
tagged value to use it for each class, so If no tagged value is present, it
will assume the namespace

    
proxies for classes
-------------------

         Key: HIB-33
         URL: http://team.andromda.org:8080/jira/browse/HIB-33
     Project: Hibernate Cartridge
        Type: Improvement
    Versions: 3.0M3
    Reporter: Carlos Cuenca
    Assignee: Carlos Cuenca



There should be a tagged value to specify wheter a class should use a
proxie. On this way the proxie will be created intead of the HashSet when
the CGLIB instantiates the class The proposed tagged value should be
@hibernate.proxy.enable and the values are true/false The proxy name will
be the implantation of the class located in the src directory. The
mapping when enabled:
<class name="myClass" proxy="myClassImpl">
....
</class>
..maye another option is to create a namespace property for the cartridge
to enable for all the classes. Carlos
      

  

Reply via email to