0 Replies Latest reply on Feb 16, 2005 12:48 AM by Bob Jones

    problem using Multiple MySql databases.

    Bob Jones Newbie

      My problem is that my CMP Beans only use the datasource entered in the standardjbosscmp-jdbc.xml file. What I'm trying to do is have my application
      talk to two or more different databases (all mysql). And the Entity beans seem
      to only use the default. I'm sure this is a configuration think I'm just
      hopeing that someone will spend the time to get me back on track.

      JBOSS.XML
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">


      <enterprise-beans>

      <ejb-name>Customer</ejb-name>
      <jndi-name>ejb/Customer</jndi-name>
      <local-jndi-name>CustomerLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/MetroDB</res-ref-name>
      <resource-name>MetroDB</resource-name>
      <jndi-name>java:/MetroDB</jndi-name>
      </resource-ref>


      <ejb-name>Policy</ejb-name>
      <jndi-name>ejb/Policy</jndi-name>
      <local-jndi-name>PolicyLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <resource-name>RadiusDB</resource-name>
      <jndi-name>java:/RadiusDB</jndi-name>
      </resource-ref>


      <ejb-name>Profile</ejb-name>
      <jndi-name>ejb/Profile</jndi-name>
      <local-jndi-name>ProfileLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <resource-name>RadiusDB</resource-name>
      <jndi-name>java:/RadiusDB</jndi-name>
      </resource-ref>


      <ejb-name>Contact</ejb-name>
      <jndi-name>ejb/Contact</jndi-name>
      <local-jndi-name>ContactLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/MetroDB</res-ref-name>
      <resource-name>MetroDB</resource-name>
      <jndi-name>java:/MetroDB</jndi-name>
      </resource-ref>


      <ejb-name>RadiusOnline</ejb-name>
      <jndi-name>ejb/RadiusOnline</jndi-name>
      <local-jndi-name>RadiusOnlineLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <resource-name>RadiusDB</resource-name>
      <jndi-name>java:/RadiusDB</jndi-name>
      </resource-ref>


      <ejb-name>User</ejb-name>
      <jndi-name>ejb/User</jndi-name>
      <local-jndi-name>UserLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <resource-name>RadiusDB</resource-name>
      <jndi-name>java:/RadiusDB</jndi-name>
      </resource-ref>



      <ejb-name>CustomerControlSession</ejb-name>
      <jndi-name>CustomerControlSession</jndi-name>
      <local-jndi-name>CustomerControlSessionLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/MetroDB</res-ref-name>
      <resource-name>MetroDB</resource-name>
      <jndi-name>java:/MetroDB</jndi-name>
      </resource-ref>


      </enterprise-beans>
      <resource-managers>
      <resource-manager>
      <res-name>RadiusDB</res-name>
      <res-jndi-name>java:/RadiusDB</res-jndi-name>
      </resource-manager>
      <resource-manager>
      <res-name>MySqlDB</res-name>
      <res-jndi-name>java:/MySqlDB</res-jndi-name>
      </resource-manager>
      <resource-manager>
      <res-name>MetroDB</res-name>
      <res-jndi-name>java:/MetroDB</res-jndi-name>
      </resource-manager>
      </resource-managers>


      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      EJB-JAR.XML
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar >

      <![CDATA[EJB's for the TransACT Communications Metro Broadband Solutio.]]>
      <display-name>Generated by XDoclet</display-name>

      <enterprise-beans>

      <!-- Session Beans -->

      <![CDATA[]]>
      <ejb-name>CustomerControlSession</ejb-name>
      com.transact.metro.ejb.customercontrol.CustomerControlSessionHome
      com.transact.metro.ejb.customercontrol.CustomerControlSession
      <local-home>com.transact.metro.ejb.customercontrol.CustomerControlSessionLocalHome</local-home>
      com.transact.metro.ejb.customercontrol.CustomerControlSessionLocal
      <ejb-class>com.transact.metro.ejb.customercontrol.CustomerControlSessionBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <resource-ref>
      <res-ref-name>jdbc/MetroDB</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Application</res-auth>
      </resource-ref>


      <!-- Entity Beans -->

      <![CDATA[]]>
      <ejb-name>Customer</ejb-name>
      com.transact.metro.ejb.customer.CustomerHome
      com.transact.metro.ejb.customer.Customer
      <local-home>com.transact.metro.ejb.customer.CustomerLocalHome</local-home>
      com.transact.metro.ejb.customer.CustomerLocal
      <ejb-class>com.transact.metro.ejb.customer.CustomerCMP</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>customerSchema</abstract-schema-name>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strCustomerID Returns the strCustomerID]]>
      <field-name>strCustomerID</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strCustomerName Returns the strCustomerName]]>
      <field-name>strCustomerName</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strCustomerPassword Returns the strCustomerPassword]]>
      <field-name>strCustomerPassword</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strCustomerAbn Returns the strCustomerAbn]]>
      <field-name>strCustomerAbn</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strCustomerAddress Returns the strCustomerAddress]]>
      <field-name>strCustomerAddress</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strCustomerCity Returns the strCustomerCity]]>
      <field-name>strCustomerCity</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field intCustomerPostcode Returns the intCustomerPostcode]]>
      <field-name>intCustomerPostcode</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field intCustomerPhone Returns the intCustomerPhone]]>
      <field-name>intCustomerPhone</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field intCustomerFax Returns the intCustomerFax]]>
      <field-name>intCustomerFax</field-name>
      </cmp-field>
      <primkey-field>strCustomerID</primkey-field>
      <resource-ref>
      <res-ref-name>jdbc/MetroDB</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Application</res-auth>
      </resource-ref>

      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM customerSchema as a]]></ejb-ql>




      <![CDATA[]]>
      <ejb-name>Policy</ejb-name>
      com.transact.metro.ejb.radius.policy.PolicyHome
      com.transact.metro.ejb.radius.policy.Policy
      <local-home>com.transact.metro.ejb.radius.policy.PolicyLocalHome</local-home>
      com.transact.metro.ejb.radius.policy.PolicyLocal

      <ejb-class>com.transact.metro.ejb.radius.policy.PolicyCMP</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>policySchema</abstract-schema-name>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field PolicyName Returns the PolicyName]]>
      <field-name>policyName</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field PolicyHook Returns the PolicyHook]]>
      <field-name>policyHook</field-name>
      </cmp-field>
      <primkey-field>policyName</primkey-field>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Application</res-auth>
      </resource-ref>

      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM policySchema as a]]></ejb-ql>




      <![CDATA[]]>
      <ejb-name>Profile</ejb-name>
      com.transact.metro.ejb.radius.profile.ProfileHome
      com.transact.metro.ejb.radius.profile.Profile
      <local-home>com.transact.metro.ejb.radius.profile.ProfileLocalHome</local-home>
      com.transact.metro.ejb.radius.profile.ProfileLocal
      <ejb-class>com.transact.metro.ejb.radius.profile.ProfileCMP</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>profileSchema</abstract-schema-name>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field PROFILENAME Returns the PROFILENAME]]>
      <field-name>PROFILENAME</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field VIRTROUT Returns the VIRTROUT]]>
      <field-name>VIRTROUT</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field VIRTLOOPBK Returns the VIRTLOOPBK]]>
      <field-name>VIRTLOOPBK</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field CheckAttr Returns the CheckAttr]]>
      <field-name>checkAttr</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field ReplyAttr Returns the ReplyAttr]]>
      <field-name>replyAttr</field-name>
      </cmp-field>
      <primkey-field>PROFILENAME</primkey-field>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Application</res-auth>
      </resource-ref>

      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM profileSchema as a]]></ejb-ql>

      <!-- Write a file named ejb-finders-ProfileBean.xml if you want to define extra finders. -->



      <![CDATA[]]>
      <ejb-name>Contact</ejb-name>
      com.transact.metro.ejb.contact.ContactHome
      com.transact.metro.ejb.contact.Contact
      <local-home>com.transact.metro.ejb.contact.ContactLocalHome</local-home>
      com.transact.metro.ejb.contact.ContactLocal
      <ejb-class>com.transact.metro.ejb.contact.ContactCMP</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>contactSchema</abstract-schema-name>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strCustomerID Returns the strCustomerID]]>
      <field-name>strCustomerID</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strContactID Returns the strContactID]]>
      <field-name>strContactID</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strName Returns the strName]]>
      <field-name>strName</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strType Returns the strType]]>
      <field-name>strType</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strTitle Returns the strTitle]]>
      <field-name>strTitle</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strPhone Returns the strPhone]]>
      <field-name>strPhone</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strFax Returns the strFax]]>
      <field-name>strFax</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strMobile Returns the strMobile]]>
      <field-name>strMobile</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strEmail Returns the strEmail]]>
      <field-name>strEmail</field-name>
      </cmp-field>
      <primkey-field>strContactID</primkey-field>
      <resource-ref>
      <res-ref-name>jdbc/MetroDB</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Application</res-auth>
      </resource-ref>

      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM contactSchema as a]]></ejb-ql>




      <![CDATA[]]>
      <ejb-name>RadiusOnline</ejb-name>
      com.transact.metro.ejb.radius.online.RadiusOnlineHome
      com.transact.metro.ejb.radius.online.RadiusOnline
      <local-home>com.transact.metro.ejb.radius.online.RadiusOnlineLocalHome</local-home>
      com.transact.metro.ejb.radius.online.RadiusOnlineLocal
      <ejb-class>com.transact.metro.ejb.radius.online.RadiusOnlineCMP</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>radiusOnlineSchema</abstract-schema-name>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strUserName Returns the strUserName]]>
      <field-name>strUserName</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strNASIdentifier Returns the strNASIdentifier]]>
      <field-name>strNASIdentifier</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strNASPort Returns the strNASPort]]>
      <field-name>strNASPort</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strAcctSessionId Returns the strAcctSessionId]]>
      <field-name>strAcctSessionId</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strEventTimestamp Returns the strEventTimestamp]]>
      <field-name>strEventTimestamp</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strFramedIPAddress Returns the strFramedIPAddress]]>
      <field-name>strFramedIPAddress</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strConnectInfo Returns the strConnectInfo]]>
      <field-name>strConnectInfo</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strNASPortType Returns the strNASPortType]]>
      <field-name>strNASPortType</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strServiceType Returns the strServiceType]]>
      <field-name>strServiceType</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strACCTSESSIONTIME Returns the strACCTSESSIONTIME]]>
      <field-name>strACCTSESSIONTIME</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strPPPDescription Returns the strPPPDescription]]>
      <field-name>strPPPDescription</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strEgressPolicyName Returns the strEgressPolicyName]]>
      <field-name>strEgressPolicyName</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strIngressPolicyName Returns the strIngressPolicyName]]>
      <field-name>strIngressPolicyName</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field integerAcctInputOctets Returns the integerAcctInputOctets]]>
      <field-name>integerAcctInputOctets</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field integerAcctOutputOctets Returns the integerAcctOutputOctets]]>
      <field-name>integerAcctOutputOctets</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field strNASPortID Returns the strNASPortID]]>
      <field-name>strNASPortID</field-name>
      </cmp-field>
      <primkey-field>strAcctSessionId</primkey-field>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Application</res-auth>
      </resource-ref>

      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM radiusOnlineSchema as a]]></ejb-ql>




      <![CDATA[]]>
      <ejb-name>User</ejb-name>
      com.transact.metro.ejb.radius.users.UserHome
      com.transact.metro.ejb.radius.users.User
      <local-home>com.transact.metro.ejb.radius.users.UserLocalHome</local-home>
      com.transact.metro.ejb.radius.users.UserLocal
      <ejb-class>com.transact.metro.ejb.radius.users.UserCMP</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>userSchema</abstract-schema-name>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field USERNAME Returns the USERNAME]]>
      <field-name>USERNAME</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field PASSWORD Returns the PASSWORD]]>
      <field-name>PASSWORD</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field ENCRYPTEDPASSWORD Returns the ENCRYPTEDPASSWORD]]>
      <field-name>ENCRYPTEDPASSWORD</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field PROFILE Returns the PROFILE]]>
      <field-name>PROFILE</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field IPADDR Returns the IPADDR]]>
      <field-name>IPADDR</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field CHECKADDR Returns the CHECKADDR]]>
      <field-name>CHECKADDR</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[<!-- begin-user-doc --> CMP Field REPLYADDR Returns the REPLYADDR]]>
      <field-name>REPLYADDR</field-name>
      </cmp-field>
      <primkey-field>USERNAME</primkey-field>
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Application</res-auth>
      </resource-ref>

      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM userSchema as a]]></ejb-ql>




      </enterprise-beans>
      </ejb-jar>

      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      JBOSSCMP-JDBC.XML

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd">

      <jbosscmp-jdbc>
      <enterprise-beans>

      <ejb-name>Customer</ejb-name>
      java:/MetroDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>true</create-table>
      <delete-table>true</delete-table>
      <table-name>Customer</table-name>
      <cmp-field>
      <field-name>strCustomerID</field-name>
      <column-name>CUSTOMER_ID</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strCustomerName</field-name>
      <column-name>NAME</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strCustomerPassword</field-name>
      <column-name>PASSWORD</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strCustomerAbn</field-name>
      <column-name>ABN</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strCustomerAddress</field-name>
      <column-name>ADDRESS</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strCustomerCity</field-name>
      <column-name>CITY</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>intCustomerPostcode</field-name>
      <column-name>POSTCODE</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>INTEGER</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>intCustomerPhone</field-name>
      <column-name>PHONE</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>INTEGER</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>intCustomerFax</field-name>
      <column-name>FAX</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>INTEGER</sql-type>
      </cmp-field>




      <ejb-name>Policy</ejb-name>
      java:/RadiusDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>false</create-table>
      <delete-table>false</delete-table>

      <table-name>POLICY</table-name>
      <cmp-field>
      <field-name>policyName</field-name>
      <column-name>PolicyName</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>policyHook</field-name>
      <column-name>PolicyHook</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>



      <ejb-name>Profile</ejb-name>
      java:/RadiusDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>false</create-table>
      <delete-table>false</delete-table>
      <table-name>PROFILE</table-name>
      <cmp-field>
      <field-name>PROFILENAME</field-name>
      <column-name>PROFILENAME</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>VIRTROUT</field-name>
      <column-name>VIRTROUT</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>VIRTLOOPBK</field-name>
      <column-name>VIRTLOOPBK</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>checkAttr</field-name>
      <column-name>CheckAttr</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>replyAttr</field-name>
      <column-name>ReplyAttr</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>



      <ejb-name>Contact</ejb-name>
      java:/MetroDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>true</create-table>
      <delete-table>false</delete-table>

      <table-name>contact</table-name>

      <cmp-field>
      <field-name>strCustomerID</field-name>
      <column-name>CUSTOMER_ID</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strContactID</field-name>
      <column-name>CONTACT_ID</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strName</field-name>
      <column-name>NAME</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strType</field-name>
      <column-name>TYPE</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>enum</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strTitle</field-name>
      <column-name>TITLE</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>enum</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strPhone</field-name>
      <column-name>PHONE</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strFax</field-name>
      <column-name>FAX</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strMobile</field-name>
      <column-name>MOBILE</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strEmail</field-name>
      <column-name>EMAIL</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>




      <ejb-name>RadiusOnline</ejb-name>
      java:/RadiusDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>false</create-table>
      <delete-table>false</delete-table>
      <table-name>ONLINE</table-name>

      <cmp-field>
      <field-name>strUserName</field-name>
      <column-name>UserName</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strNASIdentifier</field-name>
      <column-name>NASIdentifier</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strNASPort</field-name>
      <column-name>NASPort</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strAcctSessionId</field-name>
      <column-name>AcctSessionId</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strEventTimestamp</field-name>
      <column-name>AcctSessionId</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>DATETIME</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strFramedIPAddress</field-name>
      <column-name>FramedIPAddress</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strConnectInfo</field-name>
      <column-name>ConnectInfo</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strNASPortType</field-name>
      <column-name>NASPortType</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strServiceType</field-name>
      <column-name>ServiceType</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strACCTSESSIONTIME</field-name>
      <column-name>ACCTSESSIONTIME</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>INT</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strPPPDescription</field-name>
      <column-name>PPPDescription</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strEgressPolicyName</field-name>
      <column-name>EgressPolicyName</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strIngressPolicyName</field-name>
      <column-name>IngressPolicyName</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>integerAcctInputOctets</field-name>
      <column-name>AcctInputOctets</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>INTEGER</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>integerAcctOutputOctets</field-name>
      <column-name>AcctOutputOctets</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>INTEGER</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>strNASPortID</field-name>
      <column-name>NASPortID</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>



      <ejb-name>User</ejb-name>
      java:/RadiusDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>false</create-table>
      <delete-table>false</delete-table>
      <table-name>USER</table-name>

      <cmp-field>
      <field-name>USERNAME</field-name>
      <column-name>USERNAME</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>PASSWORD</field-name>
      <column-name>PASSWORD</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>ENCRYPTEDPASSWORD</field-name>
      <column-name>ENCRYPTEDPASSWORD</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>PROFILE</field-name>
      <column-name>PROFILE</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>IPADDR</field-name>
      <column-name>IPADDR</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>CHECKADDR</field-name>
      <column-name>CHECKADDR</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>REPLYADDR</field-name>
      <column-name>REPLYADDR</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>
      </cmp-field>

      </enterprise-beans>
      </jbosscmp-jdbc>

      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      JBOSS-WEB.XML

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">

      <jboss-web>

      <!-- Resource references -->
      <resource-ref>
      <res-ref-name>jdbc/RadiusDB</res-ref-name>
      <jndi-name>java:/RadiusDB</jndi-name>
      <res-url>jdbc:mysql://192.168.0.27:3306/velocity</res-url>
      </resource-ref>

      <resource-ref>
      <res-ref-name>jdbc/MySqlDB</res-ref-name>
      <jndi-name>java:/MySqlDB</jndi-name>
      <res-url>jdbc:mysql://192.168.0.1:3306/jbossdb</res-url>
      </resource-ref>

      <resource-ref>
      <res-ref-name>jdbc/MetroDB</res-ref-name>
      <jndi-name>java:/MetroDB</jndi-name>
      <res-url>jdbc:mysql://192.168.0.1:3306/jbossdb</res-url>
      </resource-ref>

      <ejb-ref>
      <ejb-ref-name>ejb/Customer</ejb-ref-name>
      <jndi-name>ejb/Customer</jndi-name>
      </ejb-ref>

      <ejb-ref>
      <ejb-ref-name>ejb/CustomerControlSession</ejb-ref-name>
      <jndi-name>ejb/CustomerControlSession</jndi-name>
      </ejb-ref>

      <ejb-ref>
      <ejb-ref-name>ejb/RadiusOnline</ejb-ref-name>
      <jndi-name>ejb/RadiusOnline</jndi-name>
      </ejb-ref>
      </jboss-web>


      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<