beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Brown" <tbrown...@earthlink.net>
Subject Control initialization failure
Date Tue, 21 Dec 2004 20:35:45 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message