hi fellaz.

I'm developing a web app using JBoss 4.0.5GA and EJB3.0, and facing a prob...

my setting is as follows:

//this is just a bean//
public class ParameterBean implements Serializable{
private int isSeo = 0;

public int getIsSeo() {
return isSeo;
}
public void setIsSeo(int isSeo) {
this.isSeo = isSeo;
}
}

//remote interface. 
//i'm calling this from the servlet.
@Remote
public interface AdFlowForMass {
public ArrayList listMassAds(ParameterBean parameters) ;
...
}

//method detail
@Stateless
public class AdFlowForMassBean implements AdFlowForMass, Serializable {
public ArrayList listMassAds(ParameterBean parameters) {
...
}
}


I call the method as follows from the servlet:

InitialContext ctx = new InitialContext();
AdFlowForMass massAdFlow = (AdFlowForMass)ctx.lookup(".../.../remote");
massAds = massAdFlow.listMassAds(parameters);


the problem is that when i pass the "parameter" to "listMassAds" from the 
servlet, "parameter"'s memory reference seems ended in the servlet and new 
"ParameterBean" is created inside of the "listMassAds" method (all the field 
values are same, thou).

so that when i modify "parameter" fields inside of the "listMassAds" method, 
the servlet's "parameter" values don change.

I tried to change the JBOSS setting such as "CallByValue=false" but it didn' 
change a thing.

i know parameter is not @Entity, but i need to change parameter values as 
reference... 

How can i pass a bean as referece to EJB methods??

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033878#4033878

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033878
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to