Hi All,
I had a weird interview yeserday - where a
JBoss /
Java Architect had ideas and comments that threw me a bit.
He made the following 5 statements (which he insisted were true - and i am doubtful - but i'm only a newbie) ...
Can I have any comments from users? - that is - correct or not - and why?
1: It is common to transfer *raw* hibernate proxy objects (typed as Object) to a web-based ui (rather than entities proper or some form of transfer object).
In cases where more information is required (eg. a lazily fetched collection) the proxy object can then be transferred back to the sever and reinitialized/reattched.
{In response to Jaikiran Pai: I tried processing hibernate proxys in a client on the way home - and i found there was difficulty in serializing proxys, the type-safe nature of java is subverted, the 'type' corresponding to the proxy seems to be generated at runtime by the server (by byte code editing?), the only way to access data seems to be reflection, the code i wrote needed to be tied to the particular version of JBoss (working a bit on JBoss 4, wouldn't even compile on Jboss 5) ... and i can't think of a way to reattach a proxy.
The question.... Are these problems real - or am i just a bit slow witted?}
2: It is better to work with the raw hibernate collections in a stateless
ejb as opposed to the standard java collections.
{In response to Jaikiran Pai: by raw hibernate collection i mean the collections used internally by hibrenate - the unusual one being 'bag' - i think this is very tight coupling between systems that should be unaware of each other?}
3: The *only* feature of J2EE is the persistence/Entity layer.
4. JMS is not a valid way to decouple information from stateless beans when starting long (many minutes) running process
{In response to Jaikiran Pai: They were using JBoss 4.2 and so only EJB3.0}
5. Container managed transactions are an inherent part of the persistence/Entity layer - rather than, for example stateless, beans.
It is not possible to mix container managed and non-container managed transactions in a single jboss application
Thanks
kjs