Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

returning a class from a Session EJB

Status
Not open for further replies.

viper2003

Programmer
May 5, 2003
7
US
I have an session ejb(MyEJB) that calls a class(skuObj.class) with a bunch of getters and setters, I retrieve a record from the database and set the row to the class like this skuObj.setSKU(the value from db).. and so on.
after that I return the class object.So my ejb Method looks like this;

NOT ALL THE CODE IS HERE IS JUST TO GIVE AN IDEA OF WHAT I AM TRYING TO DO.

public skuObj getSku(String _sku_cd) throws EJBException {
skuObj sku = new skuObj();
sql = "select * from sku where sku_cd = '" + _sku_cd + "'";
sku.setSku_cd(rs.getString("sku_cd"));
sku.setSku_desc(rs.getString("sku_desc"));
sku.setSku_class(rs.getString("sku_class"));

return sku;
}

The EJB resides in a Jboss server, so If I call the EJB from the local server, I have no problem. The problem is tha I need to call the EJB from a remote server running tomcat, I get a java.io.Exception error. I know I need to serialize the skuObj.class object in order to pass it to the remote server, and I have been looking for an example on this, but can't find any.
Is this even possible? I am quite sure it is possible, but I can not find an kind of reference to this and that is making me think otherwise.

Thanks for any help provided!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top