5 Replies Latest reply on Oct 14, 2003 7:56 AM by jonlee

    a few questions

    igor_ts

      Hi !
      Could any body show me the right way according to next questions:

      1. Im use Scheduler service for pick up email from different email boxes. When Jboss starting i take followed message

      12:01:11,927 INFO [ServiceConfigurator] Problem configuring service jboss.util:service=Scheduler,type=COrderSender

      it means that the Scheduler starting before Bean, that contain COrderSender, delpoyed. How do i can fix that problem ?

      2. My jsp use beans that each time make connection to Oracle RDBMS, i want to reduce quantity of connect/dissconect operations and use connection pool .
      Where i should place the OracleConnectionPoolDataSource ?
      In separate bean or where ?

      Igor

        • 1. Re: a few questions
          jonlee

          Put a depends clause in the scheduler's *-service.xml (look at other *-service.xml examples in the deploy directory). Make it dependent on the EJB. Use http://localhost:8080/jmx-console to help determine the dependency string.

          So for an EJB called DocumentsBean, add to the scheduler's *-service.xml:
          jndiName=DocumentsBean,service=EJB

          You want to copy docs/examples/jca/oracle-ds.xml from your distribution into the deploy directory server/default/deploy or whatever is the run-time deployment instance for your JBoss server. Usually it is default.

          Modify this template according to your needs (user, password and connection url). This file can be named anything as long as it ends with *-ds.xml. You can then obtain a connection from this connection pool.

          Refer to programming documents on looking up and using connection pools. There are plenty of tutorials on the Web.

          • 2. Re: a few questions
            jonlee

            I forgot to add that you will need to put the JDBC driver JAR in server/default/lib or the appropriate run-time instance library directory. It should be default normally, as stated above.

            • 3. Re: a few questions
              igor_ts

              Hi !
              in jmx-console

              * jndiName=ejb/KSOrderWriterEJB,plugin=pool,service=EJB
              * jndiName=ejb/KSOrderWriterEJB,service=EJB

              kssender-scheduler-service.xml

              <?xml version="1.0" encoding="UTF-8"?>


              <!-- An example Scheduler configuration to call a custom Schedulable interface implementation -->

              jndiName=ejb/KSOrderWriterEJB,service=EJB
              true
              tsm.sender.COderSender
              2003-09-18,1
              java.lang.String,int
              0
              3000
              -1



              but something wrong ! When jboss starting i got next message:

              [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
              Cause: Incomplete Deployment listing:
              Packages waiting for a deployer:

              Incompletely deployed packages:
              [org.jboss.deployment.DeploymentInfo@259e0de9 { url=file:/home/jboss/jboss-3.2.1/server/default/deploy/kssender-scheduler-service.xml }
              deployer: org.jboss.deployment.SARDeployer@246701
              status: Deployment FAILED reason: Invalid ObjectName: jndiName=ejb/KSOrderWriterEJB,service=EJB; javax.management.MalformedObjectNameException: missing domain
              state: FAILED
              watch: file:/home/jboss/jboss-3.2.1/server/default/deploy/kssender-scheduler-service.xml


              Where my mistake ?

              • 4. Re: a few questions
                jonlee

                My bad. I didn't highlight and copy over the domain. In the case that it is an EJB, you would take the additional domain jboss.j2ee.

                So the complete depends would be:
                jboss.j2ee:ejb/KSOrderWriterEJB,service=EJB

                This is why you get the error about the missing domain.

                • 5. Re: a few questions
                  jonlee

                  Oops. Not going well here with copying.

                  jboss.j2ee:jndiName=ejb/KSOrderWriterEJB,service=EJB