Loading ...
Sorry, an error occurred while loading the content.

Java App with embedded server deployment (Linux)

Expand Messages
  • wegorkie
    Hi! I was succesfull in developing Java standalone app with embedded Firebird as local database. I deploy it sucessfully on Win32 platform. Now I am trying to
    Message 1 of 8 , May 2, 2004
    • 0 Attachment
      Hi!

      I was succesfull in developing Java standalone app with embedded
      Firebird as local database. I deploy it sucessfully on Win32 platform.

      Now I am trying to port it onto Linux.
      Now, I installed FB server, I can connect to the database via port
      3050 on localhost and also by "firebirdsql:embedded:..." connection
      string using libjaybird.so and it works.

      So, there is just last step and I am not sure of it. I have to make
      deployment package so user can install my app on Linux without
      installing Firebird. On Win32 it is very simple. I just need gdb file
      and a few dll and config files - I put them on the same dir as an app
      exe and it works. It would be optimal if I could do something like
      this on Linux. But after I tried to check things by removing
      /opt/firebird dir from my installation, embedded connection stopped
      working ("cannot connect to firebird client" or sth like this).

      So I have general question. What I need to deploy as an app with FB
      embedded version on Linux? I could not find anything in accessible docs...

      Thanks,

      Maciek
    • Roman Rokytskyy
      ... It should not :) ... If you read release notes of RC2 carefully, you will see that you should not use it on Linux: Embedded version of the server cannot
      Message 2 of 8 , May 2, 2004
      • 0 Attachment
        > Now I am trying to port it onto Linux.
        > Now, I installed FB server, I can connect to the database via port
        > 3050 on localhost and also by "firebirdsql:embedded:..." connection
        > string using libjaybird.so and it works.

        It should not :)

        > So, there is just last step and I am not sure of it. I have to make
        > deployment package so user can install my app on Linux without
        > installing Firebird. On Win32 it is very simple. I just need gdb
        > file and a few dll and config files - I put them on the same dir as
        > an app exe and it works. It would be optimal if I could do something
        > like this on Linux. But after I tried to check things by removing
        > /opt/firebird dir from my installation, embedded connection stopped
        > working ("cannot connect to firebird client" or sth like this).
        >
        > So I have general question. What I need to deploy as an app with FB
        > embedded version on Linux? I could not find anything in accessible
        > docs...

        If you read release notes of RC2 carefully, you will see that you
        should not use it on Linux: "Embedded version of the server cannot be
        used on POSIX systems in multi-threaded applications.". Problem is
        that libfbembed.so is based on ClassicServer version of the server
        (Windows version is based on SuperServer version) and is compiled
        without thread support. This means that it is not clear how it will
        behave when loaded by JVM, it might work, might crash, might corrupt
        the database. Currently it is still possible to load libfbembed.so
        from JayBird, but most likely we will remove this feature from the
        release.

        You can trythis on your own risk. Also try to contact Nickolay
        Samofatov, he developed embedded version of Firebird for Linux. And
        wait for Vulcan release, which will solve this issue.

        Roman
      • wegorkie
        ... It does. When I put embedded version of connection string it does not work, then when I put jaybird.so in library path it works. Althought I just tested
        Message 3 of 8 , May 2, 2004
        • 0 Attachment
          > > string using libjaybird.so and it works.
          > It should not :)
          It does. When I put "embedded" version of connection string it does
          not work, then when I put jaybird.so in library path it works.
          Althought I just tested simple connection and trivial SQL.

          > wait for Vulcan release, which will solve this issue.
          Any schedule? (it would be nice to say something to my users who ping
          me from time to time about Linux port)

          By the way, thanks for great product.
        • Roman Rokytskyy
          ... Are you sure that you do not have libfbembed.so in the path? ... I do not know. Vulcan is a project for a specific customer and is planned to be merged
          Message 4 of 8 , May 2, 2004
          • 0 Attachment
            > It does. When I put "embedded" version of connection string it does
            > not work, then when I put jaybird.so in library path it works.
            > Althought I just tested simple connection and trivial SQL.

            Are you sure that you do not have libfbembed.so in the path?

            > > wait for Vulcan release, which will solve this issue.
            > Any schedule? (it would be nice to say something to my users who
            > ping me from time to time about Linux port)

            I do not know. Vulcan is a project for a specific customer and is
            planned to be merged with Firebird 2.0 HEAD after release. It is not
            clear if it will be publicly available as a separate product before
            the code bases are merged. Try asking in Firebird-Support, Ann
            Harrison and Paul Beach should have more information on this topic.

            Till then you have to install FB server on Linux. Note, you can use
            client library in "local" mode, which gives you approx. the same
            peformance. I also suspect that server will run without installation
            and under regular user account.

            > By the way, thanks for great product.

            Thanks!

            Roman
          • Niki Ivanchev
            I have converted, tested and used our application in Linux enviroment Although I do not use jdbc:firebirdsql:embedded but I open pool with one connection only
            Message 5 of 8 , May 3, 2004
            • 0 Attachment
              I have converted, tested and used our application in Linux enviroment
              Although I do not use jdbc:firebirdsql:embedded but I open
              pool with one connection only and use only one connection in our
              applications
              they pass all tests that we currently run. We have 8 applications that
              use firebird embedded
              and all they run on Linux.
              Niki

              Roman Rokytskyy wrote:

              >>Now I am trying to port it onto Linux.
              >>Now, I installed FB server, I can connect to the database via port
              >>3050 on localhost and also by "firebirdsql:embedded:..." connection
              >>string using libjaybird.so and it works.
              >>
              >>
              >
              >It should not :)
              >
              >
              >
              >>So, there is just last step and I am not sure of it. I have to make
              >>deployment package so user can install my app on Linux without
              >>installing Firebird. On Win32 it is very simple. I just need gdb
              >>file and a few dll and config files - I put them on the same dir as
              >>an app exe and it works. It would be optimal if I could do something
              >>like this on Linux. But after I tried to check things by removing
              >>/opt/firebird dir from my installation, embedded connection stopped
              >>working ("cannot connect to firebird client" or sth like this).
              >>
              >>So I have general question. What I need to deploy as an app with FB
              >>embedded version on Linux? I could not find anything in accessible
              >>docs...
              >>
              >>
              >
              >If you read release notes of RC2 carefully, you will see that you
              >should not use it on Linux: "Embedded version of the server cannot be
              >used on POSIX systems in multi-threaded applications.". Problem is
              >that libfbembed.so is based on ClassicServer version of the server
              >(Windows version is based on SuperServer version) and is compiled
              >without thread support. This means that it is not clear how it will
              >behave when loaded by JVM, it might work, might crash, might corrupt
              >the database. Currently it is still possible to load libfbembed.so
              >from JayBird, but most likely we will remove this feature from the
              >release.
              >
              >You can trythis on your own risk. Also try to contact Nickolay
              >Samofatov, he developed embedded version of Firebird for Linux. And
              >wait for Vulcan release, which will solve this issue.
              >
              >Roman
              >
              >
              >
              >
              >
              >Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
              >
              >
              >
            • Roman Rokytskyy
              ... If you do not use jdbc:firebirdsql:embedded, how do you use embedded server? Do you use our connection pool and set appropriate type? What Linux and JVM do
              Message 6 of 8 , May 3, 2004
              • 0 Attachment
                > I have converted, tested and used our application in Linux
                > enviroment Although I do not use jdbc:firebirdsql:embedded but I
                > open pool with one connection only and use only one connection in
                > our applications they pass all tests that we currently run. We have
                > 8 applications that use firebird embedded and all they run on Linux.

                If you do not use jdbc:firebirdsql:embedded, how do you use embedded
                server? Do you use our connection pool and set appropriate type? What
                Linux and JVM do you use?

                Thanks!
                Roman
              • Niki Ivanchev
                ... Yes I use your connection poll as described in the examples. All I do is to set only one conenction: dataSource = new
                Message 7 of 8 , May 3, 2004
                • 0 Attachment
                  Roman Rokytskyy wrote:

                  >>I have converted, tested and used our application in Linux
                  >>enviroment Although I do not use jdbc:firebirdsql:embedded but I
                  >>open pool with one connection only and use only one connection in
                  >>our applications they pass all tests that we currently run. We have
                  >>8 applications that use firebird embedded and all they run on Linux.
                  >>
                  >>
                  >
                  >If you do not use jdbc:firebirdsql:embedded, how do you use embedded
                  >server? Do you use our connection pool and set appropriate type? What
                  >Linux and JVM do you use?
                  >
                  >
                  Yes I use your connection poll as described in the examples. All I do is
                  to set only one conenction:
                  dataSource = new org.firebirdsql.pool.FBWrappingDataSource();
                  dataSource.setDatabase (mainApp.DB_NAME);
                  dataSource.setDescription ("DB Description");
                  dataSource.setType("embedded");
                  dataSource.setSqlRole("USER");
                  dataSource.setEncoding("UNICODE_FSS");
                  dataSource.setMinSize(1);
                  dataSource.setMaxSize(1);
                  dataSource.setPooling(true);
                  dataSource.setNonStandardProperty("isc_dpb_sweep", null);
                  dataSource.setNonStandardProperty("isc_dpb_num_buffers", "75");
                  FBDriverLoaded = true;
                  Straight from the docs
                  Tested on Suse 9.0, Mandrake 10.0 Redhat 8.0
                  JVM is 1.4.2_01
                  Of course I never open two connections - only one.
                  Regards
                  Niki

                  >Thanks!
                  >Roman
                  >
                  >
                  >
                  >
                  >
                  >Yahoo! Groups Links
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                • Roman Rokytskyy
                  Hi, ... Thanks a lot for the information! Roman
                  Message 8 of 8 , May 3, 2004
                  • 0 Attachment
                    Hi,

                    > Yes I use your connection poll as described in the examples. All I
                    > do is to set only one conenction:
                    > ...
                    > Tested on Suse 9.0, Mandrake 10.0 Redhat 8.0
                    > JVM is 1.4.2_01
                    > Of course I never open two connections - only one.

                    Thanks a lot for the information!

                    Roman
                  Your message has been successfully submitted and would be delivered to recipients shortly.