1 10 11 package org.mule.providers.oracle.jms; 12 13 import javax.jms.JMSException ; 14 import javax.sql.DataSource ; 15 import java.sql.Connection ; 16 import java.sql.SQLException ; 17 18 21 public class OracleInContainerJmsConnector extends AbstractOracleJmsConnector 22 { 23 24 private DataSource dataSource; 25 26 public DataSource getDataSource() 27 { 28 return dataSource; 29 } 30 31 public void setDataSource(DataSource dataSource) 32 { 33 this.dataSource = dataSource; 34 } 35 36 public Connection getJdbcConnection() throws JMSException 37 { 38 try 39 { 40 return dataSource.getConnection(); 41 } 42 catch (SQLException e) 43 { 44 throw new JMSException ("Unable to open JDBC connection: " + e.getMessage()); 45 } 46 } 47 48 } 49 | Popular Tags |