0 Replies Latest reply on Jun 17, 2006 12:08 AM by Dhirendra Kumar Singh

    How to protect a JNDI resource?

    Dhirendra Kumar Singh Newbie

      I am developing Entity Beans for the database on MySQL server. But i want that only these particular EJBs can connect with the database. I am using JBoss 4.0. My Datasource JNDI configuration is as follows:

      <?xml version="1.0" encoding="utf-8"?>
      <!-- $Id: mysql-ds.xml,v 2006/02/07 14:23:00 acoliver Exp $ -->
      <!-- Datasource config for MySQL using 3.0.9 available from:
       <!-- should only be used on drivers after 3.22.1 with "ping" support-->
       <!-- sql to call when connection is created
       <new-connection-sql>some arbitrary sql</new-connection-sql>
       <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
       <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

      Please tell me what to do to protect this resource from unauthorised access by other applications in the same server?