<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
The spec says:<br>
<br>
"An implicit bean archive is any other archive which contains one or
more bean classes with a<br>
bean defining annotation as defined in Section 2.5.1, “Bean defining
annotations”, or one or more<br>
session beans."<br>
<br>
This makes CDI enabled by default in EE 7. From the point of view of
legacy applications it may make sense to only enable CDI when a
session bean actually needs it however, there is no sane way of
figuring this out.<br>
<br>
Jozef<br>
<br>
<br>
<div class="moz-cite-prefix">On 06/30/2014 04:53 PM, Andrig Miller
wrote:<br>
</div>
<blockquote
cite="mid:6704787.295.1404140038273.JavaMail.andrig@worklaptop.miller.org"
type="cite">
<style type="text/css">p { margin: 0; }</style>
<div style="font-family: arial,helvetica,sans-serif; font-size:
12pt; color: #000000"><br>
<br>
<hr id="zwchr">
<blockquote id="DWT2872" style="border-left: 2px solid rgb(16,
16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0,
0, 0); font-weight: normal; font-style: normal;
text-decoration: none; font-family:
Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Jozef
Hartinger" <a class="moz-txt-link-rfc2396E" href="mailto:jharting@redhat.com"><jharting@redhat.com></a><br>
<b>To: </b>"Andrig Miller" <a class="moz-txt-link-rfc2396E" href="mailto:anmiller@redhat.com"><anmiller@redhat.com></a>,
"wildfly-dev" <a class="moz-txt-link-rfc2396E" href="mailto:wildfly-dev@lists.jboss.org"><wildfly-dev@lists.jboss.org></a><br>
<b>Sent: </b>Monday, June 30, 2014 4:03:59 AM<br>
<b>Subject: </b>Re: [wildfly-dev] CDI overhead<br>
<br>
I guess that the Weld subsystem is enabled for your deployment
because the deployment contains session beans. CDI is required
to be enabled for such deployments since CDI 1.1 (even though
CDI may not actually be used by your application). <br>
<br>
</blockquote>
Why is it required, if it will never be used? Is that really
what the spec says? If so, why in the world would be support
that in the spec? That simply doesn't make any sense to me.
Perhaps I'm missing something here.<br>
<br>
Andy<br>
<blockquote style="border-left: 2px solid rgb(16, 16, 255);
margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0);
font-weight: normal; font-style: normal; text-decoration:
none; font-family: Helvetica,Arial,sans-serif; font-size:
12pt;"> Alternatively to removing the Weld subsystems you can:<br>
<br>
1) Suppress implicit bean archives - only archives with
explicit beans.xml file will trigger CDI enablement. See <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://weld.cdi-spec.org/documentation/#4"
target="_blank">http://weld.cdi-spec.org/documentation/#4</a><br>
<br>
2) Enable CDI contexts for certain URL subset only:
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://docs.jboss.org/weld/reference/2.2.2.Final/en-US/html/configure.html#context.mapping"
target="_blank">http://docs.jboss.org/weld/reference/2.2.2.Final/en-US/html/configure.html#context.mapping</a><br>
<br>
Jozef<br>
<br>
<div class="moz-cite-prefix">On 06/27/2014 06:44 PM, Andrig
Miller wrote:<br>
</div>
<blockquote
cite="mid:25639789.755.1403887442476.JavaMail.andrig@worklaptop.miller.org">
<style>p { margin: 0; }</style>
<div style="font-family: arial,helvetica,sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">I should have
posted this some time ago, but just forgot.<br>
<br>
In my early testing of Wildfly 8, CDI adds quite a bit of
overhead (12% reduction in throughput) for even an
application that only uses servlets. The only way I could
get that back was to remove the subsystem. In talking
with Stuart at the time, he was looking at ways to make
the overhead less.<br>
<br>
Is there anything on the docket for making this overhead
go away for deployments that don't require CDI? If not,
can we get something going in that direction. It would be
great to not have to remove the CDI subsystem, but not
have it impact performance for deployments that don't use
it.<br>
<br>
Thanks.<br>
<br>
-- <br>
<div><span></span>Andrig (Andy) Miller<br>
Global Platform Director for JBoss Middle-ware<br>
Red Hat, Inc.<span></span><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
wildfly-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></pre>
</blockquote>
<br>
</blockquote>
<br>
</div>
</blockquote>
<br>
</body>
</html>