tirsen / activemessaging

ActiveMessaging is an attempt to bring the simplicity and elegance of Rails development to the world of messaging. Messaging, (or event-driven architecture) is widely used for enterprise integration, with frameworks such as Java's JMS, and products such as ActiveMQ, Tibco, IBM MQSeries etc
0 stars 0 forks source link

Loading sequence problem #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Plug-in loads all processors during initialization. If processors refer to 
the classes that use any 
of the plug-ins that should be loaded after activemessagingit will cause 
exception.

Original issue reported on code.google.com by alex.por...@gmail.com on 1 May 2008 at 7:21

Attachments:

GoogleCodeExporter commented 9 years ago
by removing the load_processors from the reload method, you won't get processors
reloading in dev mode, so you have sacrificed that part of a13g functionality.

Couldn't the answer to this to order your plugin loading in your rails env 
config (in
rails 2.0.+ anyway)?

Original comment by kooks...@gmail.com on 1 May 2008 at 8:01

GoogleCodeExporter commented 9 years ago
Plugin ordering works in 1.2.6 as well. The only problem is that you have to 
specify all the plugins.  You don't 
have any of the nice syntax sugar 2.0 gives you.

This is what I do:
  plugins = Dir["#{RAILS_ROOT}/vendor/plugins/*"].collect {|dir| File.basename(dir) }
  plugins.delete("rails_rcov")  # remove rails_rcov since it's not really a plugin that can be loaded
  plugins.insert(0, plugins.delete("gemsonrails")) # move gemsonrails plugin to the head of the class so all the 
vendored gems are required first
  config.plugins = plugins

Original comment by aps...@gmail.com on 9 Jun 2008 at 10:58