43493

problem with seam and mdb on jboss5.1

Question:

I have a problem when using a mdb as a seam component. In the bean I inject some other seam somponents.

The problem is that when the server restart after a crash and the mdb is deployed it starts reading the messages but seam is not initialized yet and I got an exception(listed above). If i start the server whith the queues empty and submit a message to queue after the server start it is working ok.

Is there a posibility to stop or delay the sending off messages on server startup and start sending them only when seam is fully funcional?

I tried the @Depends antotatin on the bean but withowt success

my environment : jboss5.1 GA seam 2.2.0 GA jboss messaging 1.4

Any help would be appreceated

the error on startup :

11:24:20,477 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside an initialized application

11:24:30,483 ERROR [TxPolicy] javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=10000

Answer1:

Find the solution...I was trying with the wrong name pattrn with @Depends

Add this annotation:

@Depends( {"jboss.web.deployment:war=/myappname"} )

Where myappname is the name of your app's warfile. This will delay the initialization of the MDB until after Seam has finished initializing during the war deployment.

Hope this helps someone

Recommend

  • can't import com.google.android.maps.MapView
  • Is it possible to invoke mocked object's method?
  • Sharing Redis settings across routes
  • How to Cache Images Dynamically-Generated with PHP?
  • passing parameter to server in ExtJs
  • OAuth2 flow for mobile app
  • UITableView takes much longer to load when numberOfRows returns a large number
  • Error “Reflect.defineMetadata” while trying to load a transient web worker
  • How to get Fully qualified domain name in unix
  • Spring Integration Bridge with poller not working as expected for JMS
  • retrieving data from url in iphone
  • countdown bar android example
  • MeeGo Handset Emulator not starting on Windows 7
  • How to pass nginx proxy url for socket
  • How to make Twilio api Post request with the help of AFNetworking?
  • How can I tell a form not to dispose a particular control when it closes?
  • How Get arguments value using inline assembly in C without Glibc?
  • SonarQube: Cannot deactivate rule with missing quality profile
  • 550 Access denied - Invalid HELO name
  • Button click event not firing in jQuery
  • How to get Eclipse Oxygen to run on Java 9
  • chrome.tabs.executeScript only fires when the Developer Console is open
  • JSON response opens as a file, but I can't access it with JavaScript
  • How to install a .deb file on a jailbroken iphone programmatically?
  • NHibernate Validation Localization with S#arp Architecture
  • Update CALayer sublayers immediately
  • How can I send an e-mail from a vbs script
  • req.body is undefined - nodejs
  • Accessing IRQ description array within a module and displaying action names
  • Menu Color Fade on Hover with Jquery
  • Perl system calls when running as another user using sudo
  • Trying to switch camera back to front but getting exception
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • Matrix multiplication with MKL
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • How to include full .NET prerequisite for Wix Burn installer
  • Hits per day in Google Big Query
  • Getting Messege Twice Using IMvxMessenger
  • File not found error Google Drive API
  • Converting MP3 duration time