• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Some JBoss questions - from interview yesterday - proxys, nature of J2EE, hibernate collections, ...

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

K J Smith wrote:

1: It is common to transfer *raw* 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.


What's the question here?

K J Smith wrote:
2: It is better to work with the raw hibernate collections in a stateless ejb as opposed to the standard java collections.


What's a raw hibernate collection?

K J Smith wrote:
3: The *only* feature of J2EE is the persistence/Entity layer.


If that was the case then there wouldn't be so many users complaining that Java EE (that's what it is called now) is so vast. I don't know if the interviewer asked that as a question to you or whether he/she was making a statement.

K J Smith wrote:
4. JMS is not a valid way to decouple information from stateless beans when starting long (many minutes) running process


EJB 3.1 has asynchronous invocations feature

K J Smith wrote:
5. Container managed transactions are an inherent part of the persistence/Entity layer - rather than, for example stateless, beans.


Again I don't know whether this was asked as a question or whether this was a statement. Anyway, EJBs inherently are transactional - doesn't matter if you use persistence or not.

K J Smith wrote:
It is not possible to mix container managed and non-container managed transactions in a single jboss application


Wrong again. The granularity of type of transaction is per bean level (for EJBs). A single application can have a FooBean with container managed transactions and a BarBean with Bean managed transactions.

By the way, none of this has anything to do with JBoss and it's more of Java EE. So I'll move this to an appropriate forum.
 
K J Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jaikiran Pai wrote:

K J Smith wrote:

Thanks for your reply - i have edited the original question to make things clearer.

kjs

 
Fire me boy! Cool, soothing, shameless self promotion:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic