Hello,
I am trying to use the database control and I get the following exception:
Response from the selectEmployee() method on the Employee Manager Control:
Exception caught: Control initialization failure[Contextual service
org.apache.beehive.controls.api.context.ResourceContext is not available]
This is my code from my jcx file:
import java.sql.SQLException;
import java.io.Serializable;
import java.util.Iterator;
import java.util.HashMap;
import org.apache.beehive.controls.api.bean.ControlExtension;
import dbControl.DatabaseControl;
import dbControl.DatabaseControl.ConnectionDataSource;
//@ControlExtension
//@ConnectionDataSource(jndiName="java:comp/env/com.bea.EventTracker")
@ControlExtension
@ConnectionDataSource(jndiName="jdbc:hsqldb:hsql://localhost, sa")
public interface EmployeeDBControl extends DatabaseControl
{
@SQL(statement="SELECT employee_id, first_name, last_name FROM EMPLOYEE
WHERE employee_id={ id }")
public Employee selectEmployee( int id ) throws SQLException;
@SQL(statement="UPDATE EMPLOYEE SET last_name = {lname} WHERE id =
{emp_id}")
public void updateEmployee( String lName, int emp_id ) throws
SQLException;
}
Any ideas?
Thanks,
Tim