This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Beans Accessing Beans - Functions and Data  RSS feed

 
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!