Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
osgi+dbcp connection Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • osgi+dbcp connection

    just now I'm trying to get connection to mysql db in springDM osgi environment.then I come accross strange problems.my project stucks,niether it runs other jobs nor throws exceptions.
    I put mysql-connector-java-5.0.8-bin.jar,commons-dbcp-1.2.2.jar into the Bundle-ClassPath.and xml:
    Code:
    <bean id="dataSource" destroy-method="close"
    		class="org.apache.commons.dbcp.BasicDataSource">
    		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
    		<property name="url"
    			value="jdbc:mysql://db-2.space.org:4542/test?user=test&password=test&useUnicode=true&characterEncoding=GBK" />
    		<property name="username" value="test" />
    		<property name="password" value="test" />
    		<property name="maxActive" value="30" />
    	</bean>
    after that,I thought I have not put all the dependences into the Bundle-ClassPath,so I put other commons-**.jar into the Bundle-ClassPath.but unlucky it failed the same as before.

    two questions:
    1.It seems that I can successfully use Bundle-ClassPath jars in *.java. but when cames to *.xml,it just failed and report nothing.How can I import Bundle-ClassPath jars in my project.
    2.Why my project stucks,neither run other jobs nor throws exceptions.How can I fix it since I want more infomation if it failed to get the DB connection.
    thank you in advance.
Working...
X