自己顶先,大侠帮忙,分不够再加

解决方案 »

  1.   

    HSQL 数据库能够以如下两种方式运行:进程内或客户-服务器(HSQL 文档称之为,服
    务器模式)。由于用户需要使用能够连接到DB 的工具,以运行SQL 脚本,因此必须保证数
    据库以客户-服务器模式运行,并能接受TCP/IP 连接请求。默认时,最新的JBoss 发布版将
    客户-服务器模式禁用了,这主要考虑到安全性要素,因为如果默认登陆账号没有修改将导
    致安全性问题。因此,用户需要打开设置了默认数据源的deploy/hsqldb-ds.xml 文件。在文
    件的开始部分,能够看到connection-url 元素。其取值必须是jdbc:hsqldb:hsql://localhost:1701,
    而且其他connection-url 元素值必须注释掉。
    <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
    <!-- Datasources are not available outside the virtual machine -->
    <jndi-name>DefaultDS</jndi-name>
    22
    <!-- for tcp connection, allowing other processes to use the hsqldb
    database. This requires the org.jboss.jdbc.HypersonicDatabase mbean. -->
    <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
    <!-- for totally in-memory db, not saved when jboss stops.
    The org.jboss.jdbc.HypersonicDatabase mbean is unnecessary
    <connection-url>jdbc:hsqldb:.</connection-url>
    -->
    <!-- for in-process db with file store, saved when jboss stops. The
    org.jboss.jdbc.HypersonicDatabase is unnecessary
    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}/hypersonic/localDB
    </connection-url>
    -->
    然后,定位到文件的底端部分,用户应该可以找到Hypersonic 服务的MBean 声明。
    <mbean code="org.jboss.jdbc.HypersonicDatabase" name="jboss:service=Hypersonic">
    <attribute name="Port">1701</attribute>
    <attribute name="Silent">true</attribute>
    <attribute name="Database">default</attribute>
    <attribute name="Trace">false</attribute>
    <attribute name="No_system_exit">true</attribute>
    </mbean>
    用户必须确保,这部分内容没有被注释掉,因此JBoss 才能够正确地启动DB。
      

  2.   

    多谢大侠,问题已经解决了!