not possible? The solution not have to be pretty, because it's only one SFSB
which is buried under other abstract layers. So it only has to work.
Why is it so slow?
i think it is in my case.
SFSB X is something like a Context (Application, Session, Request, Event) in Seam, so there will be a lot of them.
Y is a single DAO (per Entity one DAO) and i would have to include all of them.
Why i need this:
I cannot work with my DAOs, because each DAO has it's own ExtendedPersistenceContext. So if i have a unit-of-work i have
to use more than one of them and so the changes are not atomar
anymore. So i have to bind the lifecycle and PersistenceContext
of my DAOs with something like a Context SFSB (in the example X)
but this only works, if the DAOs are injected via Container and not
fetched via JNDI.
Unfortunatelly i can not use Seam for my application,
because Seam uses a SFSB per Use-Case and in my modular-application
the use-cases can not be foreknown.
So i need a very dynamic and abstract facade which give out persistent and not detached object.
Very simple Problem, but no simple solution (not any yet).
any hints or solutions?
It would require some JNDI calls though.
all relations are Lazy. For fetching via joines i have additional finder-methods in my DAOs.
All i want is a facade where i can get persistent (undetached) entities which are associated with one persistence-context.
If someone knows Liferay-Portal similar to their facade, but not with
the restriction of detached objects. I do not need a remote calls to the SFSBs, it is one JVM and one JBoss where Isolation is disabled.
Yes JBoss probably should lazy initialize the session beans. Open a JIRA request