• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Universal Test Client with EJB Websphere

 
pramesh babu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I developed an ejb application. I developed a universal test client.
The business logic method which i have written is argumented. When we are testing ejb applicatin with Universal test client, i should see text box to enter value for that arguments. But i am not getting that provision.

The method definition is like this:

private long [] employeeIDs = { 10010, 10023, 10045, 10051, 10061 };
private String [] employees = {"Frank", "Sam", "Maddy", "Jack", "Lorette" };

public String getEmployeeName( long employeeID )
throws javax.ejb.CreateException, java.rmi.RemoteException
{
for ( int i=0; i < employees.length; i++ )
{
if ( employeeIDs[ i ] == employeeID )
{
return employees[ i ];
}
}
return "ramesh";
}

Please help me. Thanks in advance
 
Ron V.
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is your businessmethod (so the one in the bean) than it should never throw a RemoteException. The RemoteException must be declared in the component interface (the one that extends EJBObject), but never in the actual bean (the class implementing the SessionBean/EntityBean interface).

Could be the container has some clue in it's errorlog.

Also, CreateException should be thrown from a create<method>(), not from a normal businessmethod, but I do not think this caused your problem.
 
pramesh babu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ron V.:
If this is your businessmethod (so the one in the bean) than it should never throw a RemoteException. The RemoteException must be declared in the component interface (the one that extends EJBObject), but never in the actual bean (the class implementing the SessionBean/EntityBean interface).

Could be the container has some clue in it's errorlog.

Also, CreateException should be thrown from a create<method>(), not from a normal businessmethod, but I do not think this caused your problem.


----

Hi, thanks for reply.

I removed the RemoteException and CreateException. But still i am getting the same screen where i am not getting any provision to enter argumented values to business logic method.

Please help.

Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic