14 Replies Latest reply on Jun 29, 2009 4:32 AM by Thomas Heute

    Portal database

    dorothy taylor Apprentice

      Hi

      We know that the default database that JBoss uses is HSQLDB. Is it possible that some other DB be used instead i mean can JBoss be configured with another database intead of the default one?

      Thanks

        • 1. Re: Portal database
          Søren Hilmer Newbie

          I believe that all you need to do is define a new datasource with JDNI name PortalDS.

          The HSQLDB one, is defined in portal-hsqldb-ds.xml (at least in my setup)

          • 2. Re: Portal database
            dorothy taylor Apprentice

            Is this the only place where we need to change because the HSQLDB is found in the name of the xml file as well. So it means that somewhere we may need to specify the name of the xml as well

            • 3. Re: Portal database
              Søren Hilmer Newbie

              My understanding is, that the name of the xml is unimportant.
              You just place the xml file in the deploy directory and it will be picked up at deploy time.
              Then the portal will use the JNDI name PortalDS to get to the datasource.

              • 4. Re: Portal database
                Thomas Heute Master

                correct, as long as it ends with -ds.xml

                Also make sure to not deploy 2 datasources with the same name

                • 5. Re: Portal database
                  dorothy taylor Apprentice

                  also can this custom portal database be on a different machine that is remote from where the portal server has been installed?

                  • 6. Re: Portal database
                    Søren Hilmer Newbie

                    Sure, that only depends on the <connection-url> definition in the -ds.xml

                    • 7. Re: Portal database
                      dorothy taylor Apprentice

                      Is the same applicable for the portal server's application server as well? Can the application server(of the portal container) reside on a different machine and the portal server on a different one. I mean if it cannot be then is it not a tughtly coupled architecture?

                      • 8. Re: Portal database
                        Prabhat Jha Master

                        You have to be more clear on what you mean by portal server.

                        In JBoss Portal case, it's portal bits running on top of JBoss Application server. JBoss Portal bits are deployed on the same machine running JBoss Application server. Currently, JBoss Portal only works with JBoss AS.

                        • 9. Re: Portal database
                          Peter Johnson Master

                          You can use the same database for the Portal's data as well as for the data for the portlets that you write (or that you obtain from third parties). However, I usually recommend that you use separate databases - imagine the hassle if you have to reset the Portal's database for some reason and your application's data is in the same database.

                          • 10. Re: Portal database
                            Peter Johnson Master

                            I hit Submit too soon. I should have also stated the following:

                            JBoss AS, by default, uses a datasource name DefaultDS, mainly for messaging and timer data. While you can configure both AS and Portal to use the same database, I recommend that you do not for the same reasons I gave for having your portlets use a different database for their data. It is always better to separate disparate data into separate databases for easier manageability.

                            • 11. Re: Portal database
                              dorothy taylor Apprentice

                              okay so what I understand is that the databases for portal server, application and the application server can be different from the default ones and they can even exist on remote machines. However, the same is not true in case of teh application server. THe portal server's application server needs to be JBoss only and that too in the same machine as the portal server. Is this not a tightly coupled architecture then? Why should we not be able to configyre the AS on a remote machine?

                              Thanks

                              • 12. Re: Portal database
                                Søren Hilmer Newbie

                                What do you mean by a application server?

                                If you mean that you have some application implementing your business logic (perhaps as EJB3's) and you then have your portlets as a way to realize your UI towards that application, then surely the portlets and the business app can reside on different servers.

                                But your portlets and JBoss Portal must be on the same server (and it must be a JBoss AS) which makes totally sense. I will not call that a tightly coupled architecture, the Portal is responsible for deploying your portlets, so they logically lives together.

                                Only exception (I can think of) is if you use WSRP, then your portlet can reside in another portal on another server and be shown in your JBoss Portal, but here we are talking about multiple portals not application servers (well actually both).

                                If on the other hand you have realized your business logic inside your portlets, well you have chosen to tightly couple your application and your portlet and IMO you ought to refactor your implementation.

                                • 13. Re: Portal database
                                  dorothy taylor Apprentice

                                  Well I do not mean the AS where the business logic resides. I mean to say the portal server's app server only and as you suggested that in case of WSRP also we have multiple portal servers and hence multiple app servers.

                                  Why I am calling this as tightly coupled is because a portal application is in essencec a web app only and how does it matter if the app server needs to be a specific one (like JBoss AS, in case of JBOss PS) and that too in the same machine. If we consider the portal app. as just a normal web app., which it actually is, then it should be able to run on any app server on any machine.

                                  • 14. Re: Portal database
                                    Thomas Heute Master

                                    Not any webapp can run on any AS...

                                    Yes JBoss Portal relies on JBoss AS as we are using services provided by JBoss AS that are not available on other AS (or done in a different way because not defined by a standard)

                                    A portal framework consumes services from JBoss AS to deliver services to you.