• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Datasource configuration for Cloudscape

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,

I need to create datasource for Cloudscape 10.0 in JBOSS 3.2.7. I followed the procedure mentioned in JBOSS doc.

Like, created derby-ds.xml and tried to access it from simple Java program.

All efforts were fruitless.

Any inputs on this regard are really appreciated.

Thanks and best regards,
Pash
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You must access the datasource from the same JVM of the JBoss. So you must use anyone of the J2EE component that deployed in the JBoss server to access the datasource. I think you can't access the datasource that bound in the JBoss sever from another JVM.
 
Pash Sonar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally I got the solution. I hope it will be helpful for our techi folks
I am pasting my derby-ds.xml It works fine. Let me know if anybody has any doubts.

<?xml version="1.0" encoding="UTF-8" ?>
<!--
The Derby embedded database JCA connection factory config
$Id: derby-ds.xml,v 1.1.4.1 2004/11/03 13:28:39 loubyansky Exp $

-->
<datasources>
<local-tx-datasource>
<!-- The jndi name of the DataSource, it is prefixed with java:/
-->
<!-- Datasources are not available outside the virtual machine
-->
<jndi-name>TestDemo</jndi-name>
<use-java-context>false</use-java-context>
<!--
for in-process persistent db, saved when jboss stops. The
org.jboss.jdbc.DerbyDatabase mbean is necessary for properly db shutdown

-->
<connection-url>jdbc erby:TestDemo;create=true</connection-url>
<!-- The driver class
-->
<driver-class>org.apache.derby.jdbc.EmbeddedDriver</driver-class>
<!-- The login and password
-->
<user-name />
<password />
<!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use
-->
<min-pool-size>5</min-pool-size>
<!-- The maximum connections in a pool/sub-pool
-->
<max-pool-size>20</max-pool-size>
<!-- The time before an unused connection is destroyed
-->
<idle-timeout-minutes>5</idle-timeout-minutes>
<!--
Whether to check all statements are closed when the connection is returned to the pool,
this is a debugging feature that should be turned off in production

-->
<track-statements />
<!-- This mbean can be used when using in process persistent derby
-->
<depends>jboss:service=Naming</depends>
</local-tx-datasource>
<!-- <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>
-->
</datasources>
 
All of the following truths are shameless lies. But what about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic