This content has been marked as final.
Show 2 replies
-
1. SFSB Problem - Saving data between methods invoking
jaikiran May 17, 2011 4:42 AM (in response to mavinatic)Can you please post your relevant code? That will help us in understanding the situation better.
-
2. Re: SFSB Problem - Saving data between methods invoking
mavinatic May 17, 2011 7:45 AM (in response to jaikiran)Yes of course!
SFSB - User
package com.test; import javax.ejb.Stateless; /** * Session Bean implementation class User */ @Stateful public class User implements UserRemote, UserLocal { String user = null; /** * Default constructor. */ public User() { // TODO Auto-generated constructor stub } @Override public String getUser() { // TODO Auto-generated method stub return this.user; } @Override public void setUser(String user) { // TODO Auto-generated method stub this.user=user; } }
SLSB - UserReader
package com.test2; import javax.ejb.Stateless; import com.test.UserLocal; /** * Session Bean implementation class UserReader */ @Stateless public class UserReader implements UserReaderRemote { @EJB(name="User") UserLocal uLocal; /** * Default constructor. */ public UserReader() { // TODO Auto-generated constructor stub } @Override public void setUser(String user) { // TODO Auto-generated method stub uLocal.setUser(user); } @Override public String getUser() { // TODO Auto-generated method stub return uLocal.getUser(); } }
when i try to set and get this String via UserReaderRemote i can set it but i cant get it :O If I would create a third SessionBean and i would set with UserReaderRemote and want to get it with my third SB it wouldnt work, too
Can you help me please?
Can you follow me?