Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAMES-2886 Custome Guice injections in James extensions jar #2699

Closed
wants to merge 14 commits into from

Conversation

chibenwa
Copy link
Member

Why did I work on this?

As a preparation for the ApacheCon, talk promoting James as a flexible and extensible email server, I intend to present the following use case:

  • Write a custom API (for example WhiteList)
  • Implement that API (memory?) + a guice binding
  • Write a WhiteListMailet relying on the API
  • Write a webadmin route for adding entries in the API
  • Then package 3 jars-with-dendencies (mailet, route & implem)
  • Load all of that in James! (extensions-jars)
  • Start James
  • Do some curl rest to add a whitelist entries
  • Demonstrate that the mailet is well executed according to the webAdmin route execution

(Then I will present other extensions (MailboxListener, ProtocolHandlers, PreDeletionHooks, etc...)

Why this work is different from the previous proposals?

Here it is important to notice, a child injector is used, and is specific to extensions (custom mailet, matchers, etc..).

Regular James entities are unaffected by these bindings that empower the user to write powerful extensions.

Furthermore, this enables to write extensions applying orthogonal architecture, and enables an easy packaging and distribution0

Final notes

I believe this is one of the missing building block for Guice adoption.

Remain work for this "ApacheCon" plan

Well, allow custom WebAdmin routes <3

@chibenwa chibenwa added the contribution Contribution of a kind contributor - also applicable for community oriented efforts. label Sep 19, 2019
@chibenwa chibenwa added this to the Sprint 11 - Robusta beans milestone Sep 19, 2019
@chibenwa
Copy link
Member Author


[ab9c89efed7a79513dcce8f5174fc2b49b98e6fc] [ERROR]   CassandraMailRepositoryTest.storingAndRemovingMessagesConcurrentlyShouldLeadToConsistentResult » Execution
[ab9c89efed7a79513dcce8f5174fc2b49b98e6fc] [ERROR]   CassandraMailRepositoryTest.storingAndRemovingMessagesConcurrentlyShouldLeadToConsistentResult » Execution

test this please

chibenwa added a commit to chibenwa/james-project that referenced this pull request Sep 20, 2019
@chibenwa
Copy link
Member Author

Just rebased

chibenwa added a commit to chibenwa/james-project that referenced this pull request Sep 20, 2019
chibenwa added a commit to chibenwa/james-project that referenced this pull request Sep 20, 2019
@rouazana
Copy link

[f7dbfb35e6970fbb8517bd93facb3ccd1ac286f3] [ERROR] Errors: 
[f7dbfb35e6970fbb8517bd93facb3ccd1ac286f3] [ERROR]   ConcurrentTestRunnerTest.runShouldPerformAllOperationsEvenOnOccasionalExceptions:230 » NotTerminated

test this please. But interesting to dig?

Copy link

@rouazana rouazana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardly missing some documentation :)

@chibenwa
Copy link
Member Author

JamesMailSpoolerTest.threadSuicideShouldAckTheItem:126 » ConditionTimeout Cond...

test this please

@chibenwa
Copy link
Member Author

DiscardProtocolTest.testRecord:84 » Timed out wait for be notified that read ...

test this please

src/site/xdoc/server/config-listeners.xml Outdated Show resolved Hide resolved
@chibenwa chibenwa added waiting_merge We are about to merge this! and removed cross-review needed labels Sep 23, 2019
@chibenwa
Copy link
Member Author

Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Contribution of a kind contributor - also applicable for community oriented efforts. waiting_merge We are about to merge this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants