Hi,
I found an e-mail on the mailing list according which the following steps
are enough to get a working Postgres pool:
"1) jboss.conf (see MLET tag-pair)
<MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext">
<ARG TYPE="java.lang.String" VALUE="PostgreSQLPool">
<ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>
2) jboss.jcml
<mbean name="DefaultDomain:service=XADataSource,name=PostgreSQLPool">
<attribute
name="URL">jdbc:postgresql://172.16.1.1/investment</attribute>
<attribute name="Password">pgres</attribute>
<attribute name="JDBCUser">pgres</attribute>
</mbean>
3) jboss.properties
jdbc.drivers=org.hsql.jdbcDriver,jdbc.idbDriver,org.postgresql.Driver
The postgres driver is in the lib\ext directory and jBoss (jBoss BETA PROD
01) starts without a problem and without errors. The console log indicates
the XA pool is created for postgres.
"
Here is the content of my:
1)jboss.conf
<MLET CODE = "org.jboss.logging.Logger" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.logging.ConsoleLogging" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="Information,Debug,Warning,Error">
<ARG TYPE="java.lang.String" VALUE="[{2}] {4}">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="../../log/">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="../../tmp/">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="../../db/">
</MLET>
<MLET CODE = "org.jboss.util.Info" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="./">
</MLET>
<MLET CODE = "org.jboss.jdbc.JdbcProvider"
ARCHIVE="jboss.jar,idb.jar,hsql.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.web.WebService" ARCHIVE="jboss.jar,dynaserver.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.jdbc.HypersonicDatabase"
ARCHIVE="jboss.jar,hsql.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.naming.NamingService" ARCHIVE="jnpserver.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.tm.TransactionManagerService"
ARCHIVE="jboss.jar,jta-spec1_0_1.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.security.SimpleRealmMappingService"
ARCHIVE="jboss.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.security.EJBSecurityManagerService"
ARCHIVE="jboss.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.jdbc.DataSourceImpl"
ARCHIVE="jboss.jar,jdbc2_0-stdext.jar" CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String"
VALUE="jdbc:idb:../conf/instantdb.properties">
<ARG TYPE="java.lang.String" VALUE="InstantDB">
<ARG TYPE="java.lang.String" VALUE="jdbc.idbDriver">
<ARG TYPE="java.lang.String" VALUE="">
<ARG TYPE="java.lang.String" VALUE="">
</MLET>
<MLET CODE = "org.jboss.jdbc.DataSourceImpl" ARCHIVE="jboss.jar,rt.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String"
VALUE="jdbc:odbc:PROVIDER=MSDASQL;dsn=test;uid=;pwd=:test;">
<ARG TYPE="java.lang.String" VALUE="mySQL">
<ARG TYPE="java.lang.String" VALUE="sun.jdbc.odbc.JdbcOdbcDriver">
<ARG TYPE="java.lang.String" VALUE="">
<ARG TYPE="java.lang.String" VALUE="test">
</MLET>
<MLET CODE=org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext">
<ARG TYPE="java.lang.String" VALUE="PostgreSQLPool">
<ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>
<MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="Hypersonic">
<ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>
<MLET CODE = "org.jboss.ejb.ContainerFactory"
ARCHIVE="jboss.jar,ejb.jar,jnp-client.jar,ejxeditor.jar,ejxjboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.ejb.AutoDeployer" ARCHIVE="jboss.jar">
<ARG TYPE="java.lang.String" VALUE="../deploy/">
</MLET>
<MLET CODE = "org.jboss.jmx.server.JMXAdaptorService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.jmx.server.RMIConnectorService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "com.sun.jdmk.comm.HtmlAdaptorServer" ARCHIVE="jmxtools.jar"
CODEBASE="../lib/ext/" NAME="Adaptor:name=html">
</MLET>
<MLET CODE = "org.jboss.configuration.ConfigurationService"
ARCHIVE="jboss.jar,xml.jar" CODEBASE="../lib/ext/">
</MLET>
2)jboss.jcml
<server>
<mbean name="Adaptor:name=html">
<attribute name="MaxActiveClientCount">10</attribute>
<attribute name="Parser" />
<attribute name="Port">8082</attribute>
</mbean>
<mbean name="DefaultDomain:service=MLet">
<attribute name="LibraryDirectory">S:\Program
Files\jboss\jBoss20\bin</attribute>
</mbean>
<mbean name="DefaultDomain:service=XADataSource,name=Hypersonic">
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:HypersonicSQL:hsql://localhost</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="Password" />
<attribute name="ShrinkPercent">0.33</attribute>
<attribute name="GCEnabled">false</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">false</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="JDBCUser">sa</attribute>
<attribute name="MinSize">0</attribute>
<attribute name="ShrinkMinIdleTime">600000</attribute>
<attribute name="ShrinkingEnabled">false</attribute>
</mbean>
<mbean name="DefaultDomain:service=XADataSource,name=PostgreSQLPool">
<attribute
name="URL">jdbc:postgresql://192.168.0.142/visa01</attribute>
<attribute name="Password">postgres</attribute>
<attribute name="JDBCUser">postgres</attribute>
</mbean>
<mbean name="DefaultDomain:service=Logging,type=Console">
<attribute name="Format">[{2}] {4}</attribute>
</mbean>
<mbean name="DefaultDomain:service=Webserver">
<attribute name="Port">8083</attribute>
</mbean>
<mbean name="EJB:service=ContainerFactory">
<attribute name="VerifyDeployments">true</attribute>
</mbean>
</server>
3)jboss.properties
jdbc.drivers=org.hsql.jdbcDriver,jdbc.idbDriver,sun.jdbc.odbc.JdbcOdbcDriver
,org.postgresql.Driver
Here is what I get in on the server output:
[JDBC] Loaded JDBC-driver:org.hsql.jdbcDriver
[JDBC] Loaded JDBC-driver:jdbc.idbDriver
[JDBC] Loaded JDBC-driver:sun.jdbc.odbc.JdbcOdbcDriver
[JDBC] Loaded JDBC-driver:org.postgresql.Driver
[Webserver] Initializing
[Webserver] Initialized
[Hypersonic] Initializing
[Hypersonic] Server 1.4 is running
[Hypersonic] Database started
[Hypersonic] Initialized
[Naming] Initializing
[Naming] Naming started on port 1099
[Naming] Initialized
[Transaction manager] Initializing
[Transaction manager] Initialized
[Simple Realm Mapping] Initializing
[Simple Realm Mapping] Initialized
[Security manager] Initializing
[Security manager] Initialized
[DataSource] Initializing
[DataSource] Connection pool for jdbc:idb:../conf/instantdb.properties bound
to
InstantDB
InstantDB - Version 3.12
[DataSource] Copyright (c) 1997-1999 Instant Computer Solutions Ltd.
[DataSource] Initialized
[DataSource] Initializing
[DataSource] Connection pool for
jdbc:odbc:PROVIDER=MSDASQL;dsn=test;uid=;pwd=:t
est; bound to mySQL
[DataSource] Initialized
[XADataSource] Initializing
[XADataSource] Initialized
[Container factory] Initializing
[Container factory] Temporary directory set to:S:\jboss\jBoss20\tmp\deploy
[Container factory] Initialized
[Auto deploy] Watching S:\jboss\jBoss20\deploy
[Auto deployer] Initializing
[Auto deployer] Initialized
[JMX RMI Adaptor] Initializing
[JMX RMI Adaptor] Initialized
[JMX RMI Connector] Initializing
[JMX RMI Connector] Initialized
[Configuration] Initializing
[Configuration] Initialized
javax.management.ReflectionException: The MBean class could not be loaded by
the
specified loader
at
com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.ja
va:754)
at javax.management.loading.MLet.getMBeansFromURL(MLet.java:540)
at javax.management.loading.MLet.getMBeansFromURL(MLet.java:369)
at org.jboss.Main.<init>(Main.java:119)
at org.jboss.Main.<init>(Main.java:94)
at org.jboss.Main$1.run(Main.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:75)
[Configuration] MaxActiveClientCount set to 10 in Adaptor:name=html
[Configuration] Port set to 8082 in Adaptor:name=html
[Configuration] LibraryDirectory set to S:\Program Files\jboss\jBoss20\bin
in De
faultDomain:service=MLet
What's wrong with my configuration settings?
I tested the drvier and the connection settings from a simple java app. and
they are working properly.
Looking forward to your reply,
Kamen.
----- Original Message -----
From: "Charles Crain" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 7:28 PM
Subject: Re: [jBoss-User] Postges jdbc driver
> I'm not at home right now, so I can't send you my exact configuration
files, but
> I can provide some guidelines that can hopefully get you started:
>
> - Look on the postgres web page for where the jdbc drivers are in your
postgres
> installation. The docs give you the file names (they should be .jar
files), so
> if worse comes to worst, you can always search for those file names.
> - Choose the JDBC driver compiled for JDK 1.2
> - Copy this .jar file into your jboss/lib/ext directory
> - Go into your jboss.conf file, you will see some entries in there for the
JDBC
> drivers for InstantDB and HypersonicSQL. Copy and paste one of these,
then
> change the name of the .jar file, username, password, and database
connection
> URL to match the Postgres settings. The format for the databse connection
URL
> is in the Postgres documentation.
> - Go into jboss.properties, and add the full class name for the Postgres
driver
> in the list of JDBC drivers there. There should already be entries for
> InstantDB and HypersonicSQL
> - In your CMP entity beans, you will need to use ejx to modify the
jaws.xml file
> to use postgres as the data source. Also enable the type mappings for
postgres.
>
> Hopefully this will get you started. This is what I had to do to figure
it out
> anyway. Most of it involves reading the Postgres dox.
>
> -Charles
>
> Kamen wrote:
>
> > Thanks Charles,
> > could you please let me know what exactly would I have to do in order to
use
> > postgress connections from jboss. (Please take a look at the other
e-mail
> > that I sent earlier today titled:
> > Re: [jBoss-User] Entity BMP Transaction Rollback
> >
> > )
> > Regards,
> > Kamen
> > ----- Original Message -----
> > From: "Charles Crain" <[EMAIL PROTECTED]>
> > To: "jBoss" <[EMAIL PROTECTED]>
> > Sent: Friday, September 29, 2000 5:51 PM
> > Subject: Re: [jBoss-User] Postges jdbc driver
> >
> > > The latest release of Postgres comes with its own jdbc drivers (check
the
> > > postgres docs on the web). I have had no problems with them. Use the
1.2
> > > version of the drivers.
> > >
> > > -Charles
> > >
> > > Kamen wrote:
> > >
> > > > Hi all,
> > > > I'm interested in a good jdbc postgres driver that I could use
problem
> > free
> > > > in jboss.
> > > > Regards,
> > > > Kamen
> > > >
> > > > --
> > > > --------------------------------------------------------------
> > > > To subscribe: [EMAIL PROTECTED]
> > > > To unsubscribe: [EMAIL PROTECTED]
> > > > Problems?: [EMAIL PROTECTED]
> > >
> > >
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe: [EMAIL PROTECTED]
> > > To unsubscribe: [EMAIL PROTECTED]
> > > Problems?: [EMAIL PROTECTED]
> > >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Problems?: [EMAIL PROTECTED]
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
----- Original Message -----
From: "Charles Crain" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 7:28 PM
Subject: Re: [jBoss-User] Postges jdbc driver
> I'm not at home right now, so I can't send you my exact configuration
files, but
> I can provide some guidelines that can hopefully get you started:
>
> - Look on the postgres web page for where the jdbc drivers are in your
postgres
> installation. The docs give you the file names (they should be .jar
files), so
> if worse comes to worst, you can always search for those file names.
> - Choose the JDBC driver compiled for JDK 1.2
> - Copy this .jar file into your jboss/lib/ext directory
> - Go into your jboss.conf file, you will see some entries in there for the
JDBC
> drivers for InstantDB and HypersonicSQL. Copy and paste one of these,
then
> change the name of the .jar file, username, password, and database
connection
> URL to match the Postgres settings. The format for the databse connection
URL
> is in the Postgres documentation.
> - Go into jboss.properties, and add the full class name for the Postgres
driver
> in the list of JDBC drivers there. There should already be entries for
> InstantDB and HypersonicSQL
> - In your CMP entity beans, you will need to use ejx to modify the
jaws.xml file
> to use postgres as the data source. Also enable the type mappings for
postgres.
>
> Hopefully this will get you started. This is what I had to do to figure
it out
> anyway. Most of it involves reading the Postgres dox.
>
> -Charles
>
> Kamen wrote:
>
> > Thanks Charles,
> > could you please let me know what exactly would I have to do in order to
use
> > postgress connections from jboss. (Please take a look at the other
e-mail
> > that I sent earlier today titled:
> > Re: [jBoss-User] Entity BMP Transaction Rollback
> >
> > )
> > Regards,
> > Kamen
> > ----- Original Message -----
> > From: "Charles Crain" <[EMAIL PROTECTED]>
> > To: "jBoss" <[EMAIL PROTECTED]>
> > Sent: Friday, September 29, 2000 5:51 PM
> > Subject: Re: [jBoss-User] Postges jdbc driver
> >
> > > The latest release of Postgres comes with its own jdbc drivers (check
the
> > > postgres docs on the web). I have had no problems with them. Use the
1.2
> > > version of the drivers.
> > >
> > > -Charles
> > >
> > > Kamen wrote:
> > >
> > > > Hi all,
> > > > I'm interested in a good jdbc postgres driver that I could use
problem
> > free
> > > > in jboss.
> > > > Regards,
> > > > Kamen
> > > >
> > > > --
> > > > --------------------------------------------------------------
> > > > To subscribe: [EMAIL PROTECTED]
> > > > To unsubscribe: [EMAIL PROTECTED]
> > > > Problems?: [EMAIL PROTECTED]
> > >
> > >
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe: [EMAIL PROTECTED]
> > > To unsubscribe: [EMAIL PROTECTED]
> > > Problems?: [EMAIL PROTECTED]
> > >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Problems?: [EMAIL PROTECTED]
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
----- Original Message -----
From: "Oleg Nitz" <[EMAIL PROTECTED]>
To: "jBoss Developer" <[EMAIL PROTECTED]>
Sent: Saturday, September 30, 2000 3:30 PM
Subject: Re[10]: [jBoss-Dev] Re: Garbage Connection
> Dan OConnor wrote:
> DO> Obviously an MBean is different from a persistence manager, but we
> DO> might want to adopt this standard for MBeans as well.
> I believe that CastorJDO is a kind of persistence manager by nature.
>
> DO> You could then declaratively express in a server configuration
> DO> file the transaction characteristics of the resources
> DO> that you retrieve: enlisted in the transaction or not.
> Declaratively? I guess it would be defined dynamically: for CastorJDO
> all Connections except for KeyGenerator's ones should be enlisted in
> the transaction.
> How about the following: to bind two DataSources for each database URL
> to different JNDI names, one for transactional Connections, another
> for non-transactional ones.
>
> DO> P.S. I'll try to read your e-mails before responding to them from
> DO> now on!
> I'll try to produce shorter e-mails :-)
>
> Best regards,
> Oleg
>
>
>
>