13 Replies Latest reply on Mar 25, 2002 3:57 PM by Darius

    JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all on Wi

    Darius Newbie

      Greetings,
      I've spent some time attempting to replace Hypersonic with firebird+interclient(from sourceforge) as DefaultDS. After buying and reading the $10 docs plus the online docs (which apply more to jboss 3) I can't see any reason why the above combination would not work, so presumably I'm doing something wrong.

      Nevertheless would someone who has seen and/or used interclient+firebird with JBoss 2.4.4 mind confirming that these play well together?

      I've also had a look a David Jenks' JCA mbean for interbase, but it's not clear to me whether CMP can be made to use it. Any explanations about why/why not and recommendations for/against would be much appreciated. Recommended sources of info beyond the j2ee/jca spec and the jboss docs would also be greatly appreciated.

      Thanks,
      Darius

        • 1. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
          Marcus Brito Novice

          First you need to make sure you can connect to Interbase using any JDBC program. It's a pain in the ass to get the correct firebird + interclient versions. Once you're sure you can connect to the DB, configure JBoss.

          Remember to include username and password (sysdba/masterkey, if you haven't changed) in the configuration file. If things still don't go right, get your stack trace and post it here.

          I've used firebird + intercliente + JBoss 3.0. I'm not sure with 2.4.x, but it should work.

          • 2. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
            David Jencks Master

            The FBManager mbean won't do much for cmp since it isn't a driver, just a tiny management interface letting you create and drop databases. However, the jca-jdbc driver works fine: when I was developing it I was using the current jboss version to see if it worked. There's a config file for jboss 3 accessible through the online manual, I should probably come up with something for 2.4.4 since I want to put out a release.

            The principal advantages of the jca-jdbc driver are:
            1. true xa transaction support.

            2. easier installation, simpler architecture.

            3. works directly in jca framework without the jca-jdbc wrappers or the XADataSourceImpl nonsense.

            4. Possible to fix bugs in it in a finite amount of time.


            However, it is not as complete a jdbc implementation as interclient.

            • 3. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
              Darius Newbie

              That is good advice pazu; thanks. This combination now works with jdbc-client+interserver+firebird running on same and different Win2k systems.

              The JBOSS 2.0 Advanced Configuration doc also helped (URL below for other seekers of truth).
              (http://www.isk.kth.se/~isk_jabe/projektweb/doc/Artifacts/Construktion/other/jBoss%202_Advanced.pdf)

              After encountering some glitchy behavior with interclient (2.01 from firebird) and its unaddressed bugs (those listed on sourceforge anyway) I have doubts about relying on it as part of a production system that needs concurrent access to Interbase. Perhaps it would be stable enough to use with CMP at startup; just to simplify loading some relatively static data.

              If anyone has observations/experiences concerning the reliability of Firebird's interclient in a production context, a post here would be much appreciated.

              thanks,

              • 4. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                Darius Newbie

                Greetings David, thanks for your input.

                >> The FBManager mbean won't do much for cmp since it isn't a driver, just a tiny management interface letting you create and drop databases.
                However, the jca-jdbc driver works fine: when I was developing it I was using the current jboss version to see if it worked. There's a config file for
                jboss 3 accessible through the online manual, I should probably come up with something for 2.4.4 since I want to put out a release.

                It looks like most of the development and testing of jca-jdbc would have been done with JBoss 3.0. If this is true then it leaves me a little uneasy about expecting the same stability on JBoss 2.4 (but perhaps my concern is unjustified because of j2ee/jca spec and the architectural niceties of both jboss 3 & 2.4 internals).

                Is there an expectation that JBoss 3 + jca-jdbc + firebird would be at least as stable a combination as JBoss 2.4.4 + jca-jdbc + firebird at the moment?

                >> The principal advantages of the jca-jdbc driver are:
                >> 1. true xa transaction support.
                >> 2. easier installation, simpler architecture.
                >> 3. works directly in jca framework without the jca-jdbc wrappers or the XADataSourceImpl nonsense.
                >> 4. Possible to fix bugs in it in a finite amount of time.

                >> However, it is not as complete a jdbc implementation as interclient.

                I'm tempted to ask what you mean by 'not as complete' but perhaps better to ask what jca-jdbc's limitations are at the moment, whether there is anything significant that missing that can't be worked around within one or two days?

                Cheers,
                Darius

                • 5. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                  David Jencks Master

                  I think the major bug fixes for the jca framework have been backported from jboss 3 to 2.4.4. As far as the driver itself, there should be no difference in jboss versions.

                  I think several people have been running interclient in production, although I don't know for sure.

                  I don't know of any serious problems using the jca-jdbc driver with jboss 3, although I'm not running a production site or anything on it. I've been working to get more of the jboss testsuite to work with it, and so far the only problem has been that many of the tests have string primary keys that are way too long for firebird. If you do run into a problem, you are far more likely to get it fixed with the jca-jdbc driver than with interclient... I don't know of anyone who is willing to work on interclient without getting paid.

                  • 6. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                    Wayne Pennington Newbie

                    Mr. Jencks,

                    I'm building a Win2000 server running JBOSS 3.0 beta with Firebird. After unsuccessful attempts with Interclient (apparently buggy SQL exchanges), jca-jdbc looks to be a worthwhile bet.

                    Is the jca-jdbc build.bat at firebird CVS working? (I've been unsuccessful at using the CVS version ... results below.) Perhaps if I understood the desired ANT Build.xml arguments, I could get the *.bat to work. Does the Build.bat require arguments?

                    Regards, Wayne

                    MY JCA-JDBC BUILD.BAT RESULT:

                    C:\client-java\src\build>build

                    C:\client-java\src\build>java -classpath ..\..\build\classes;..;"C:\jdk131\lib\tools.jar";"..\..\lib\ant.jar";"..\..\lib\junit.jar
                    ";"..\..\lib\optional.jar";"..\..\lib\xalan.jar";"..\..\lib\xerces.jar";"..\..\lib\xml-apis.jar" org.apache.tools.ant.Main -Djava
                    x.xml.parsers.DocumentBuilderFactory=$JAXP_DOM_FACTORY -Djavax.xml.parsers.SAXParserFactory=$JAXP_SAX_FACTORY
                    Buildfile: build.xml

                    init:

                    compile-classes:
                    [depend] Deleted 0 out of date files in 0 seconds
                    [javac] Compiling 106 source files to C:\client-java\output\classes

                    BUILD FAILED

                    C:\client-java\src\build\build.xml:124: The file or path you specified (..\..\build\classes) is invalid relative to C:\client-java

                    • 7. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                      David Jencks Master

                      Does it work if you replace

                      set LOCALCLASSPATH=..\..\build\classes


                      with

                      set LOCALCLASSPATH=..\..\output\classes

                      ?

                      Please advise, if this is correct I'd like to fix the firebird cvs. (I don't have windows to try this on).

                      You don't need any arguments to build.bat. If you supply any, they should be passed directly to ant.

                      Thanks
                      david jencks

                      • 8. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                        Marcus Brito Novice

                        Also, it seems that $JAXP_DOM_FACTORY and $JAXP_SAX_FACTORY need to be replaced by %JAXP_DOM_FACTORY% and %JAXP_SAX_FACTORY%.

                        Variable substitution on bat files uses %VAR% instead of the unixish $VAR.

                        • 9. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                          Wayne Pennington Newbie

                          Gents,

                          Got the batch bat and xml files working. Thanks for your help. (Tried attaching the files to this message but am getting a jive parsing error. I'll email them directly if you like.)

                          BUILD.BATCH changes include:

                          @echo on ... for bug tracing
                          ...
                          SETLOCAL
                          set PATH=%PATH%;..\output\classes
                          set PATH=%PATH%;..
                          set PATH=%PATH%;"%ANT_HOME%\bin"
                          set PATH=%PATH%;"%JAVA_HOME%\lib\tools.jar"
                          ...
                          set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% -Djavax.xml.parsers.DocumentBuilderFactory=%JAXP_DOM_FACTORY%

                          set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% -Djavax.xml.parsers.SAXParserFactory=%JAXP_SAX_FACTORY%
                          ...

                          ANT %ANT_CMD_LINE_ARGS%

                          The RUNANT line does nothing and can be deleted.

                          I modified the BUILD.XML slightly (also attached):

                          1. Used JBOSS_DIST from environment instead of absolute path:

                          <!-- Override with your JBoss server dist location if the JBOSS_DIST env var is not set -->


                          2. got rid of the depend statement on line 112 ... was causing an error and the directory existed anyway

                          3. unnecessarly, I globally changed "build.class" to "output.class"

                          Results so far:

                          1. default rar build works fine.
                          2. deploy build is missing firebird-services.xml
                          3. javadocs build can't find the source directory although it correct reports it(C:\client-java\src) ... I'll continue to work on this.

                          In any case, I can begin to do some integration and testing.

                          Thanks again, wayne

                          • 10. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                            David Jencks Master

                            Thanks, I'd appreciate you sending me the modified files.

                            davidjencks@directvinternet.com

                            Firebird-service.xml is at the jboss site, look at the end of ch 3 of the free online manual for the link.

                            Javadocs... I never even tried to build them... not very much of the code is commented intelligibly.

                            • 11. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                              Darius Newbie

                              Greetings David,

                              re: There's a config file for jboss 3 accessible through the online manual, I should probably come up with something for 2.4.4 since I want to put out a release.

                              I've tried using the following definition with JBoss 2.4.4 (in jboss.jcml) and get messages like;

                              Detected JMX Bug: Server reports attribute 'XXXXXX' is not writeable for MBean 'YYYYYYY'

                              as JBoss is starting (log extract appended below).

                              Does this indicate a compatibility problem between JBoss 2.4.4 and the Firebird JCA driver?

                              Kind Regards and Thanks,
                              Darius

                              ---8<---- begin JBoss 2.4.4 jboss.jcml definition for Firebird JCA -----8<----

                              Database=localhost/3050:c:/dvlproj/ib/JBCMP.GDB
                              DefaultDS2
                              java:/TransactionManager
                              <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Firebird Database Connector
                              <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaXACMFactory
                              #
                              BlockingTimeoutMillis=500000
                              IdleTimeoutMinutes=30
                              MaxSize=10
                              CleanupIntervalMinutes=30
                              MinSize=0
                              MaxIdleTimeoutPercent=1.0


                              org.jboss.resource.security.ManyToOnePrincipalMapping

                              UserName=sysdba Password=masterkey


                              ---8<---- end JBoss 2.4.4 jboss.jcml definition for Firebird JCA -----8<----

                              ---8<---- begin JBoss 2.4.4 startup log extract ----8<---
                              [DEBUG,ConfigurationService] TransactionManagerName set to java:/TransactionManager in jboss.jca:service=ConnectionFactoryLoader,name=FirebirdDS
                              [DEBUG,ConfigurationService] ConnectionManagerProperties set to #
                              BlockingTimeoutMillis=500000
                              IdleTimeoutMinutes=30
                              MaxSize=10
                              CleanupIntervalMinutes=30
                              MinSize=0
                              MaxIdleTimeoutPercent=1.0 in jboss.jca:service=ConnectionFactoryLoader,name=FirebirdDS
                              [DEBUG,ConfigurationService] PrincipalMappingClass set to org.jboss.resource.security.ManyToOnePrincipalMapping in jboss.jca:service=ConnectionFactoryLoader,name=FirebirdDS
                              [DEBUG,ConfigurationService] PrincipalMappingProperties set to UserName=sysdba Password=masterkey in jboss.jca:service=ConnectionFactoryLoader,name=FirebirdDS
                              [DEBUG,ConfigurationService] Detected JMX Bug: Server reports attribute 'Backlog' is not writeable for MBean 'DefaultDomain:service=Naming'
                              [DEBUG,ConfigurationService] Detected JMX Bug: Server reports attribute 'ResourceAdapterName' is not writeable for MBean 'JCA:name=JmsXA,service=ConnectionFactoryLoader'
                              [DEBUG,ConfigurationService] Detected JMX Bug: Server reports attribute 'ResourceAdapterName' is not writeable for MBean 'jboss.jca:name=FirebirdDS,service=ConnectionFactoryLoader'
                              [DEBUG,ConfigurationService] Detected JMX Bug: Server reports attribute 'Deployers' is not writeable for MBean 'EJB:service=AutoDeployer'
                              [DEBUG,ConfigurationService] Detected JMX Bug: Server reports attribute 'ResourceAdapterName' is not writeable for MBean 'JCA:name=MinervaDS,service=ConnectionFactoryLoader'
                              ---8<---- end JBoss 2.4.4 startup log extract -----8<----

                              (I'd attach a file containing the whole log but I get 'connection reset by peer' whenever I make the attempt)

                              • 12. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                                David Jencks Master

                                The ConnectionFactoryLoader configuration for jboss 2.4.4. is very different from that for 3.0. You'll need to look carefully at the examples in jboss.jcml and try to map the stuff in 3 back to it. The contents are rather different.

                                The driver works fine with 2.4.4 -- I developed it using 2.3, but I can't find the configuration I was using. The message about jmx bug is just that - detecting a bug in jmxri. It doesn't seem to affect the mbeans as far as I know however.

                                • 13. Re: JBoss 2.4.4 and Firebird 1.0 via interclient 2.01 (all o
                                  Darius Newbie


                                  >> The ConnectionFactoryLoader configuration for jboss
                                  >> 2.4.4. is very different from that for 3.0. You'll
                                  >> need to look carefully at the examples in jboss.jcml
                                  >> and try to map the stuff in 3 back to it. The contents
                                  >> are rather different.

                                  Hi David, thanks for taking the time to reply - I'll see what I can come up with.

                                  >> The driver works fine with 2.4.4 -- I developed it
                                  >> using 2.3, but I can't find the configuration I was
                                  >> using.
                                  >> The message about jmx bug is just that -
                                  >> detecting a bug in jmxri. It doesn't seem to affect
                                  >> the mbeans as far as I know however.