Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Beans Accessing Beans - Functions and Data

 
Rob Lovett
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am trying to access one Bean (EnvironBean) from another Bean (CalFunc) and although I can access EnvironBean's functions I cannot get hold of the data that has been stored there.
I am calling the EnvironBean using:
private EnvironBeanRob envInfo =new EnvironBeanRob();
I think that the problem lies in the word "new" - is there another way to declare this?
many thanks for all your help in advance.
Regards
Rob
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Lovett:
Hello,
I am trying to access one Bean (EnvironBean) from another Bean (CalFunc) and although I can access EnvironBean's functions I cannot get hold of the data that has been stored there.
I am calling the EnvironBean using:
private EnvironBeanRob envInfo =new EnvironBeanRob();
I think that the problem lies in the word "new" - is there another way to declare this?
many thanks for all your help in advance.
Regards
Rob

Are these EJB's? If so, you CERTAINLY can't use new like this -- what kind of EJB's are they -- stateful session beans? What are you really trying to do?
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!