Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created November 6, 2018 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/d6af498fafa2c1dc8497f254140e6a31 to your computer and use it in GitHub Desktop.
Save AdamBien/d6af498fafa2c1dc8497f254140e6a31 to your computer and use it in GitHub Desktop.
57thAirhacksQ&A.md

Ask questions and see you at December, 3rd, 6.PM. CET: http://www.ustream.tv/channel/adambien

Also checkout recent episode:

56th airhacks.tv

Please keep the questions Java EE-stic. Means: as short and as concise as only possible.

@vkalayda
Copy link

vkalayda commented Dec 20, 2018

Hi Adam,

As i can understand @Inject does not use pooling vs @ejb which uses pooling. This means that it is slower if we use @Inject due to object creation?

Hello, as Adam says it depends on Application Server, as i know for instance WildFly does not use pools.

Regarding behaviour on GlassFish / Payara Application Servers:

If you are injecting component via @Inject and this is Stateless component - it will use object pools.
If you are injecting POJO with @Inject - it depends on scope of injected component.

So my recommendation is - use @Inject everywhere.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment