Hello,
I am trying to setup mysql with jboss-3.0.4-tomcat-4.1.12. What ever I do it does not work. Can someone please tell me step by step how to setup mysql with jboss-3.0.4-tomcat-4.1.12. I am using BMP.
This is what i did so far I download the jbdc driver for mysql and put it under ...jboss/server/default/lib and put mysql-service.xml into jboss/server/default/depoly with proper url, username, password.
I am getting jboss.jca:service=LocalTxDS,name=MySqlDS does not implement any Service methods error
here is my code:
public void setEntityContext(EntityContext context)
{
this.context = context;
try {
makeConnection();
} catch (Exception ex) {
throw new EJBException("Unable to connect to database " +
ex.getMessage());
}
}
private void makeConnection() throws NamingException, SQLException
{
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:comp/env/MySqlDS");
con = ds.getConnection();
}
Thanks
AP