• Post Reply Bookmark Topic Watch Topic
  • New Topic

Administered objects

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am curious to know why TopicConnectionFactory is administered object and not TopicConnection itself?
Thanks in advance.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the *creation* of an object gives you more control than *using* an object... When the factory is an administered object, also the connections it hands out are administered.
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do u mean by an administered object in the first place, can any explain this clearly, and which other objects in java are administered objects??
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand administered objects as follows:
  • Their lifecycle is controlled by someone else than the client (although the client can indirectly cause lifecycle events such as creation/deletion).
  • Their actual implementation is hidden from the client.

  • An example of an administered object could be an EJB. The bean instance's lifecycle is controlled by the EJB Container. Even though the bean client has the ability to say create(), the actual creation is managed by the container and the user only knows the interface of the object reference it receives.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!