8 Replies Latest reply: Feb 27, 2004 9:45 AM by Scott Stark RSS

    EJB Timer Service

    Ivelin Ivanov Expert

      Is somebody interested in making helping out with the EJB Timer services?

      1) Transaction support is needed
      2) Entity needs to keep ContainerTimerService map as a WeakValueHashMap
      (see org.jboss.util)
      3) Scott also seems to want to use quartz as our new scheduler and this
      would effect EJB Timer Service as well.

      Let me know,

      Thanks,

      Bill Burke

        • 1. Re: EJB Timer Service
          Bill Burke Master

          Hi Bill,

          I helped you isolate a thread sync bug in the EJB deadlock detector back in the early JBoss 3.0 cycle.

          Subsequently I fixed the CMP BLOB handling in 3.0 and 3.2 and also added test cases that demonstrated some bugs.

          I'll have a look at the existing implementation and drop Thomas a line.

          Steve Coy

          • 2. Re: 3.2.4 Release Tasks
            Stephen Coy Novice

            Hi Ivelin,

            The idea is to add support for CMT transaction time-out config in jboss.xml
            Something like:

             <assembly-descriptor>
             <container-transaction>
             <method>
             <ejb-name>StatelessSessionBean</ejb-name>
             <method-name>*</method-name>
             </method>
             <transaction-timeout>2000</transaction-timeout>
             </container-transaction>
             <container-transaction>
             <method>
             <ejb-name>StatelessSessionBean</ejb-name>
             <method-name>takesALongTime</method-name>
             </method>
             <transaction-timeout>10000</transaction-timeout>
             </container-transaction>
             </assembly-descriptor>
            </jboss>
            


            You can use TransactionManager.setTransactionTimeout() to set the thread local
            to accomplish this, but...
            There is no portable mechanism to reset the value.
            You cannot get the previous value or the default value.

            This would require an alternate interface on our TxManager
            and probably just drop the feature when a third party transaction manager
            does not implement the interface.
            e.g.

            public interface org.jboss.tm.TransactionManagerExtensions
            {
            long getTransactionTImeout()
            }

            • 3. Re: tools for reporting
              Everton T B Araujo Newbie

               

              "nraghuram" wrote:
              thanks. I was looking for OLAP tools
              raghu


              Someone referred to Mondrian, which is an OLAP engine.

              JPivot, also on SourceForge, is an OLAP UI that utilizes Mondrian.


              Sherman

              • 4. EJB remoting solution
                Scott Stark Master

                Can anyone have the success story of connect to EJB over rmi/iiop transport?

                Can I get the connection to EJB over "pure" corba iiop transport? (generating client stubs from IDL, initialize ORB, etc.) I try but get CORBA BAD_PARAM errors :((

                If I use the rmi/iiop transport (solution from http://www.jboss.org/developers/projects/jboss/IIOP)
                I get the ClassCastException :((
                My client code in this case:

                public static void main(String[] args) {
                lbsGW = getEjb();
                }

                private static LbsGWu getEjb() throws NamingException, CreateException, RemoteException {
                javax.naming.Context context = getContext();
                System.out.println("after getContext");
                java.lang.Object obj = context.lookup("LbsGWUniformHomeRemote");
                if(obj != null) {
                try {
                return ((LbsGWuHome) javax.rmi.PortableRemoteObject.narrow(obj,LbsGWuHome.class)).create();
                }catch (Exception e) {
                e.printStackTrace();
                return null;
                }
                }
                return null;
                }


                private static javax.naming.Context getContext() throws NamingException {

                Properties p = new Properties();
                p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
                p.put(javax.naming.Context.PROVIDER_URL, "corbaloc:iiop:localhost:3528/JBoss/Naming/root");
                System.out.println("create InitialContext");

                try {
                javax.naming.Context ctx= new InitialContext(p);

                return ctx;
                }catch (Exception e) {
                e.printStackTrace();
                return null;
                }
                }

                LbsGWuHome and LbsGWu - home and remote EJB interfaces, generates from XDoclet.

                exception rises in return ((LbsGWuHome) javax.rmi.PortableRemoteObject.narrow(obj,LbsGWuHome.class)).create();
                step



                • 5. Re: EJB Timer Service
                  Stephen Coy Novice

                  Did anyone pick this up? If not, I am interested.

                  Steve Coy

                  • 6. Re: EJB Timer Service
                    Stephen Coy Novice

                    Hi Bill,

                    I helped you isolate a thread sync bug in the EJB deadlock detector back in the early JBoss 3.0 cycle.

                    Subsequently I fixed the CMP BLOB handling in 3.0 and 3.2 and also added test cases that demonstrated some bugs.

                    I'll have a look at the existing implementation and drop Thomas a line.

                    Steve Coy

                    • 7. Re: EJB Timer Service
                      Stephen Coy Novice

                       

                      "Bill Burke" wrote:

                      tdiesler@jboss.org


                      Bill,

                      Thomas is not responding on this address. I can see that he has been active from the CVS checkins, although not in this area.

                      Steve Coy


                      • 8. Re: EJB Timer Service
                        Bill Burke Master

                        try

                        Thomas Diesler <thomas.diesler@jboss.org>

                        What is your email?