[jbossseam-issues] Accessing entities outside of injection

David Radunz davidr at utiba.com
Thu Nov 22 19:50:23 EST 2007


Hey,

    Not sure if this is the correct list to be posting to, if it isn't 
please advise the appropriate place. I have a web application that does 
not use persistence (hibernate) as we have a non-database data source 
and a custom mediation layer between that and Seam. I have a need to get 
a new (or existing) instance of a named entity (or what ever: 
action/controller as well) by code. The reason I am posting a request to 
the mailing list is because we are using the @Install annotation and as 
such I cannot instantiate the class directly because I of course want 
the "installed" version.

Something like the following would be great..

---------------------------
package test.product;

@Name("person")
@Install(1)
public class Person {

}
---------------------------

---------------------------
package test.site;

@Name("person")
@Install(2)
public class Person extends test.product.Person {

}
---------------------------


And then in code somewhere use "person" to obtain a new or existing 
instance of "test.site.Person" (being the installed version). Perhaps 
some sort of EL resolving code?


Any ideas?

David

-- 
David Radunz

Senior Developer
Utiba Pty Ltd
ph: +613 9606 0444
ad: Level 6, 190 Queen St, Melbourne, VIC, 3000, Australia

-------------- next part --------------
A non-text attachment was scrubbed...
Name: davidr.vcf
Type: text/x-vcard
Size: 255 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/seam-issues/attachments/20071123/f6c9f7bd/attachment.vcf 


More information about the seam-issues mailing list