0 Replies Latest reply on Dec 15, 2003 4:51 AM by xs2iop

    MDB JMS out of memory occurs

    xs2iop Newbie

      Hello,

      i make a Message Driven Bean, a client call this mdb and request him a CRL download file (Certificate Revocation List).mdp process a httpconnection and try to download crl file.

      i use mdb example of jboss and default configuration.

      for big CRL (4 Mo file) an out of memory occurs

      if you have any suggestion....



      X509CRL crl=null;
      try
      {
      Date dt1=new Date();
      debug(j,"BEGIN CRL DOWNLOAD at....: "+sdf.format(dt1));
      debug(j,"CRL URL DOWNLOAD.........: "+j.getUrl());
      Date dt2=new Date();

      crl = GetCRLfromHTTP.get(j.getUrl());
      byte[] crlB=crl.getEncoded();

      //InputStream stream= GetCRLfromHTTP.getFlow(j.getUrl());

      j.setCrl(crlB);

      j.setStatus(0);
      debug(j,"END CRL DOWNLOAD SUCCESFULL at : "+sdf.format(dt2));
      debug(j,"Downloading CRL in : "+Long.toString(dt2.getTime()-dt1.getTime())+" millisecondes");
      responseProcess(msg,j);
      again=false;
      }
      catch (Exception e1)
      {



      crl = GetCRLfromHTTP.get(j.getUrl()); is a method that init an httpurlconnection and get an input stream and transform this stream in crl...

      log jboss:

      11:12:15,550 INFO [STDOUT] CRLFinder.ejbRemove, this=23095497
      11:12:17,723 ERROR [LogInterceptor] Unexpected Error:
      java.lang.OutOfMemoryError
      11:12:17,733 ERROR [JMSContainerInvoker] Exception in JMSCI message listener
      javax.ejb.EJBException: Unexpected Error
      java.lang.OutOfMemoryError

      at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:370)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:374)
      at org.jboss.ejb.Container.invoke(Container.java:700)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:824)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1114)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433)
      at org.jboss.mq.SpySession.run(SpySession.java:298)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
      at java.lang.Thread.run(Thread.java:534)



      Sébastien