In the WebSphereCommerceServerExtensionsData project using the Java EE perspective, double click the deployment descriptor. Click on the Details button next to the Enterprise Java Bean section or go directly to the bean tab. Select your bean from the list of beans on the left. Then, on the right, scroll down to finders and select Add.

For the name, use the findByX naming convention. Name it according to the parameters that are being used. For the parameters, add as many as needed, entering the name of the variables along with the variable type.

For return type, it should be the bean if only 1 possible row can be returned. If more than one can be returned, use enumeration.

For the finder type, select WhereClauseFinderDescriptor. In the finder statement, enter the WHERE query. This will come after WHERE in the statement, so your query does not need to include it. For the parameters, enter ? as place holders, and they will be in the order in which you defined the parameters.

T1.COLUMNOFFIRSTPARAMETER = ? AND T1.COLUMNOFSECOND = ?

Click finish, and then save the deployment descriptor.

Then, right click on the WebSphereCommerceServerExtensionsData project, go to Java EE, then Access Beans, and select Regenerate Access Beans.

In that list, select the bean you just added the finder to, and click finish.

Your bean should now have the finder available to use in the code. To ensure your changes will be reflected, right click on the WebSphereCommerceServerExtensionsData project, go to Java EE, then select prepare for deployment.

Finally, right click on the server and do a publish.