0 Replies Latest reply on Jul 9, 2008 4:49 PM by erikslagter

    Accessing Seam context in customer servlet

    erikslagter

      I have a customer servlet that listens to a specified TCP port for incoming data. I want to use Seam component I made to process the incoming data. But everytime I try to access a named object I get the following error:



      java.lang.IllegalStateException: No application context active
              at org.jboss.seam.Component.forName(Component.java:1807)
              at org.jboss.seam.Component.getInstance(Component.java:1857)
              at org.jboss.seam.Component.getInstance(Component.java:1840)
              at org.jboss.seam.Component.getInstance(Component.java:1834)
              at nl.chess.m2m.minitixpos.tlvcommunicator.message.FixedFormatRecordProcessor.processPaymentByTLV(FixedFormatRecordProcessor.java:186)
              at nl.chess.m2m.minitixpos.tlvcommunicator.TLV.TLVProcessor.processTLV(TLVProcessor.java:29)
              at nl.chess.m2m.minitixpos.tlvcommunicator.SocketWorker.run(SocketWorker.java:84)
              at java.lang.Thread.run(Thread.java:595)




      The code it fails on is the following:


      PaymentRequest paymentRequest = (PaymentRequest) Component.getInstance("paymentRequest");




      So it tries to get the instance of a object named paymentRequest.
      How can I modify my application so that it can reach the paymentRequest object?