users@glassfish.java.net

Re: Resource injection in JSP how to...

From: Edson Carlos Ericksson Richter <edson.richter_at_mgrinformatica.com.br>
Date: Thu, 08 Jun 2006 20:00:59 -0300

Yes, I see. It's a risk making as was made, but

1) Each controller has it's own EntityManager, and is maintained on user
session - so there is one controller for each user, for each page it's
accessing;
2) It's more a exercise for API manipulation than a real use;
3) Shows that developers start to make things API designers never imagine

And this is the beauty of programming...

I will add a note about risks of doing things like this - but still a
very interesting API manipulation...


Richter


Marina Vatkina escreveu:
> Richter,
>
> Yes, you can inject a EntityManagerFactory. But each EM created from such
> factory should be single threaded in its use (the spec makes it a
> responsibility
> of a user), and must be closed at the end of the use to release the
> resources.
>
> See Sahoo's blog on this issue:
> http://weblogs.java.net/blog/ss141213/archive/2005/12/dont_use_persis_1.html
>
>
> Regards,
> -marina
>
> Edson Carlos Ericksson Richter wrote:
>> ... ok, may be I just made a sidekick on the server... Still
>> interesting way to get resource injection on JSP pages:
>>
>> http://jroller.com/page/brviking?entry=resource_injection_in_jsps_is
>>
>>
>>
>> Richter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>
>