From ehugonne at redhat.com Mon Oct 2 10:34:46 2017 From: ehugonne at redhat.com (Emmanuel Hugonnet) Date: Mon, 2 Oct 2017 16:34:46 +0200 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: Hi, For those who can take 7'26 of their time to look at what we can do with the new provisioning tool to build and share custom feature packs. https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature Url : http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171002/e81fdcdb/attachment.bin From kwills at redhat.com Mon Oct 2 11:28:26 2017 From: kwills at redhat.com (Ken Wills) Date: Mon, 02 Oct 2017 15:28:26 +0000 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: Thanks for sharing that Emmanuel, seems to be coming along well! On Mon, Oct 2, 2017 at 9:36 AM Emmanuel Hugonnet wrote: > Hi, > > For those who can take 7'26 of their time to look at what we can do with > the new provisioning tool to build and share custom feature packs. > > https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171002/3860adab/attachment.html From brian.stansberry at redhat.com Mon Oct 2 15:32:51 2017 From: brian.stansberry at redhat.com (Brian Stansberry) Date: Mon, 2 Oct 2017 14:32:51 -0500 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: +1. I encourage folks to check this out; it's short and sweet. Brian Stansberry Manager, Senior Principal Software Engineer Red Hat On Mon, Oct 2, 2017 at 10:28 AM, Ken Wills wrote: > Thanks for sharing that Emmanuel, seems to be coming along well! > > On Mon, Oct 2, 2017 at 9:36 AM Emmanuel Hugonnet > wrote: > >> Hi, >> >> For those who can take 7'26 of their time to look at what we can do with >> the new provisioning tool to build and share custom feature packs. >> >> https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 >> >> >> _______________________________________________ >> wildfly-dev mailing list >> wildfly-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/wildfly-dev > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171002/353d49e7/attachment.html From sstark at redhat.com Mon Oct 2 19:51:57 2017 From: sstark at redhat.com (Scott Stark) Date: Mon, 2 Oct 2017 16:51:57 -0700 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: Interesting. It brings up a discussion point I have been meaning to raise across the Wildfly and Wildfly-Swarm teams regarding tools for the step before this assembly step of feature-packs and fractions into a distributable archive. The issue I have seen is that when authoring a feature-pack or fraction, it is difficult to know how to configure the module dependencies. One is often starting with GAV dependencies from a spec, and it is difficult to know how those map onto modules in existing feature-packs for fractions. Do we have any tooling in this area to make this task not a trial and error effort? On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet wrote: > Hi, > > For those who can take 7'26 of their time to look at what we can do with > the new provisioning tool to build and share custom feature packs. > > https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171002/b5057dfb/attachment.html From emartins at redhat.com Tue Oct 3 10:11:27 2017 From: emartins at redhat.com (Eduardo Martins) Date: Tue, 3 Oct 2017 15:11:27 +0100 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> Message-ID: I think it would make more sense to expand the capabilities of the migration tool to handle the update, since the update is the reverse task of the migration. But more than this, the tool is now integrated in server dist, and it already has all the functionality, though spis, to handle updates of everything in the dist, i.e modules, server configs (both xml and management level) and their referenced resources (property files, keystores, certs, etc). Why rebuild distort through feature packs anyway, wasn?t it designed to build a dist? ?E > On 25 Sep 2017, at 10:06, Emmanuel Hugonnet wrote: > > Hey guys, > > TL;DR > I've been experimenting with Alexey to update a customized provisioned server using the provisioning tool [1]. > I'm using the syncing operations [2] that I created a while back by porting the domain synchronization operations to standalone (to > synchronize standalone instances in a cloud environment). > I'm looking for some feedback on this approach. > Cheers > Emmanuel > > [1]: https://github.com/ehsavoie/pm/tree/upgrade-feature-pack > [2]: https://github.com/ehsavoie/wildfly-core/tree/model_diff > > ---- > full version: > > > Updating WildFly > > > Terminology > > Updating is the process of applying a fix pack that will increment the micro version. There should be no compatiblity issue. Upgrading is > the transition of a minor version, compatiblity should be available but there are a lot more changes. > > While the mecanisms discussed here are general, they might need more refinement for an upgrade. > > > Use case > > The use case is quite simple: *I have version 1.0.0 installed and i want to update to 1.0.1 but I have locally customized my server and i?d > like to keep those changes*. > We have several local elements to take into account: > > * > > filesystem changes (files added, removed or deleted). > > * > > configuration changes. > > The basic idea is to diff the existing instance with a pure new installation of the same version then apply those changes to a new > provisioned version instance for staging. > We can keep it at the basic filesystem approach with some simple merge strategy (theirs, ours). > We can use the plugin to go into more details. For exemple using the model diff between standalone Wildfly instances we can create a cli > script to reconfigure the upgraded instance in a post-installation step. > > > Diffing the filesystem > > The idea is to compare the instance to be upgraded with one instance provisioned with the same feature packs as the one we want to upgrade. > The plugin will provide a list of files or regexp to be excluded. > Each file will be hashed and we compare the hash + the relative path to deduce deleted, modified or added files. > For textual files we can provide a diff (and the means to apply it), but maybe that should be for a later version as some kind of > interaction with the user might be required. > > > WildFly standalone > plugin > > This is a specialization of the upgrading algorithm: > > * > > Filtering out some of the 'unimportant' files (tmp, logs). > > * > > Creating diff of textual files (for example the realm properties) which will be applied (merging strategy ? la git). > > * > > Using an embedded standalone it creates a jboss-cli script to reconfigure the server (adding/removing extensions and reconfiguring > subsystems). > > * > > Deleting files that were removed. > > This is done on a staging upgraded instance before being copied over the old instance. > I have added a diff/sync operation in standalone that is quite similar to what happens when a slave HC connects to the DC. Thus I start the > current installation, and connect to it from an embedded server using the initial configuration and diff the models. > This is 'experimental' but it works nicely (I was able to 'upgrade' from the standalone.xml of wildfly-core to the standalone-full.xml of > wildfly). > I?m talking only about the model part, I leave the files to the filesystem 'diffing' but it wiill work with managed deployments are those > are added by the filesystem part and then the deployment reference is added in the model. > For a future version of the tooling/plugin we might look for a way to interract more with the user (for example for applying the textual > diffs to choose what to do per file instead of globally). > Also currently the filters for excluding files are defined by the plugin but we could enrich them from the tooling also. > > > Producing an > update feature pack > > From the initial upgrade mecanism Alexey has seen the potential to create a feature pack instead of my initial format. > Currently i?m able to create and installa a feature-pack that will supersede the initial installation with its own local modifications. > Thus from my customized instance I can produce a feature pack that will allow me to reinstall the same instance. Maybe this can be also use > to produce upgrade feature pack for patching. > > > WildFly domain mode > > Domain mode is a bit more complex, and we need to think how to manager the model changes. > Those can be at the domain level or the host level and depending on the instance target we would need to get the changes from the domain.xml > or/and the host.xml. > I?m thinking about applying the same strategy as what was done for standalone : aka expose the sync operations to an embedded HC. > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev From emartins at redhat.com Tue Oct 3 10:14:01 2017 From: emartins at redhat.com (Eduardo Martins) Date: Tue, 3 Oct 2017 15:14:01 +0100 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> Message-ID: <666DFEF0-6FE0-4842-BE7B-F02E8D15674C@redhat.com> > On 03 Oct 2017, at 15:11, Eduardo Martins wrote: > > Why rebuild distort through feature packs anyway, wasn?t it designed to build a dist? Why rebuild it all through feature packs anyway, wasn?t it designed to build artifacts and composed a set of these to build a dist? Feels like several in-between and not needed steps to handle the update? ?E -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171003/ed39a7eb/attachment.html From alexey.loubyansky at redhat.com Tue Oct 3 10:37:41 2017 From: alexey.loubyansky at redhat.com (Alexey Loubyansky) Date: Tue, 3 Oct 2017 16:37:41 +0200 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: It's not exactly clear to me what issue you are describing. But I can provide some basic info on how feature-packs are authored for the wildfly releases (core, servlet, full). Perhaps then you could ask a more specific question. A feature-pack represents a specific release. So there will be a feature-pack for the core, another one for the servlet distribution and another one for the full one. In feature-packs, modules are organized into packages (which is an atomic unit of content possibly with dependencies on other packages from the same or another feature-pack). When a feature-pack is generated, the packages are generated from the modules. Each module becomes are package in a feature-pack. And module dependencies become package dependencies. Is it any close to the issue you described? On Tue, Oct 3, 2017 at 1:51 AM, Scott Stark wrote: > Interesting. > > It brings up a discussion point I have been meaning to raise across the > Wildfly and Wildfly-Swarm teams regarding tools for the step before this > assembly step of feature-packs and fractions into a distributable archive. > > The issue I have seen is that when authoring a feature-pack or fraction, > it is difficult to know how to configure the module dependencies. One is > often starting with GAV dependencies from a spec, and it is difficult to > know how those map onto modules in existing feature-packs for fractions. Do > we have any tooling in this area to make this task not a trial and error > effort? > > > > On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet > wrote: > >> Hi, >> >> For those who can take 7'26 of their time to look at what we can do with >> the new provisioning tool to build and share custom feature packs. >> >> https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 >> >> >> >> _______________________________________________ >> wildfly-dev mailing list >> wildfly-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/wildfly-dev >> > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171003/09e6889a/attachment.html From bmcwhirt at redhat.com Tue Oct 3 11:03:47 2017 From: bmcwhirt at redhat.com (Bob McWhirter) Date: Tue, 3 Oct 2017 11:03:47 -0400 Subject: [wildfly-dev] [wildfly-swarm-internal] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: I think the issue (at least as I?ve found it) is that we either: a) scrub around in existing feature-packs and modules/ directory to determine if there?s a module.xml matching the thing and version we need or b) hand-author a module.xml based upon pom.xml, adding a chance to mess things up. -Bob On Tue, Oct 3, 2017 at 10:37 AM, Alexey Loubyansky < alexey.loubyansky at redhat.com> wrote: > It's not exactly clear to me what issue you are describing. But I can > provide some basic info on how feature-packs are authored for the wildfly > releases (core, servlet, full). Perhaps then you could ask a more specific > question. > > A feature-pack represents a specific release. So there will be a > feature-pack for the core, another one for the servlet distribution and > another one for the full one. In feature-packs, modules are organized into > packages (which is an atomic unit of content possibly with dependencies on > other packages from the same or another feature-pack). > When a feature-pack is generated, the packages are generated from the > modules. Each module becomes are package in a feature-pack. And module > dependencies become package dependencies. Is it any close to the issue you > described? > > On Tue, Oct 3, 2017 at 1:51 AM, Scott Stark wrote: > >> Interesting. >> >> It brings up a discussion point I have been meaning to raise across the >> Wildfly and Wildfly-Swarm teams regarding tools for the step before this >> assembly step of feature-packs and fractions into a distributable archive. >> >> The issue I have seen is that when authoring a feature-pack or fraction, >> it is difficult to know how to configure the module dependencies. One is >> often starting with GAV dependencies from a spec, and it is difficult to >> know how those map onto modules in existing feature-packs for fractions. Do >> we have any tooling in this area to make this task not a trial and error >> effort? >> >> >> >> On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet >> wrote: >> >>> Hi, >>> >>> For those who can take 7'26 of their time to look at what we can do with >>> the new provisioning tool to build and share custom feature packs. >>> >>> https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 >>> >>> >>> >>> _______________________________________________ >>> wildfly-dev mailing list >>> wildfly-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>> >> >> >> _______________________________________________ >> wildfly-dev mailing list >> wildfly-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/wildfly-dev >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171003/f2a66885/attachment.html From ehugonne at redhat.com Wed Oct 4 13:13:43 2017 From: ehugonne at redhat.com (Emmanuel Hugonnet) Date: Wed, 4 Oct 2017 19:13:43 +0200 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: <666DFEF0-6FE0-4842-BE7B-F02E8D15674C@redhat.com> References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <666DFEF0-6FE0-4842-BE7B-F02E8D15674C@redhat.com> Message-ID: Hi, Yes there is a blank installation to compute the diff( model and filesystem). The filesystem diff is not specific to WildFly/EAP and happens in the general scope. The 'wildfly' part is about the deletion of files only. The demo is more about creating a customized 'image' of your installation that you can replicate. This comes from the initial goal which was to update an instance. Maybe we should be using the migration tool from the wildfly plugin to upgrade an instance, this is worth more discussions and tests. But if I want to upgrade from 6.4 to 7.0 with the deployment my_super_application.war this would be handled automatically as the application would be part of the feature pack and would simply be replaced with the new one during the upgrade and the configuration changes would be 'migrated' thought the legacy subsystem or the new handlers. Cheers, Emmanuel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature Url : http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171004/777f0cf3/attachment.bin From sstark at redhat.com Wed Oct 4 13:23:35 2017 From: sstark at redhat.com (Scott Stark) Date: Wed, 4 Oct 2017 10:23:35 -0700 Subject: [wildfly-dev] [wildfly-swarm-internal] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: Correct. Starting from a pom that contains the artifact dependencies, how to translate this into an appropriate module.xml for the output fraction is a trial and error process currently. Does the information exist so that one could go from GAV and/or package names dependencies to the module that provides said dependencies from amongst a set of wildfly feature pack? On Tue, Oct 3, 2017 at 8:03 AM, Bob McWhirter wrote: > I think the issue (at least as I?ve found it) is that we either: > > a) scrub around in existing feature-packs and modules/ directory to > determine if there?s a module.xml matching the thing and version we need or > > b) hand-author a module.xml based upon pom.xml, adding a chance to mess > things up. > > -Bob > > On Tue, Oct 3, 2017 at 10:37 AM, Alexey Loubyansky < > alexey.loubyansky at redhat.com> wrote: > >> It's not exactly clear to me what issue you are describing. But I can >> provide some basic info on how feature-packs are authored for the wildfly >> releases (core, servlet, full). Perhaps then you could ask a more specific >> question. >> >> A feature-pack represents a specific release. So there will be a >> feature-pack for the core, another one for the servlet distribution and >> another one for the full one. In feature-packs, modules are organized into >> packages (which is an atomic unit of content possibly with dependencies on >> other packages from the same or another feature-pack). >> When a feature-pack is generated, the packages are generated from the >> modules. Each module becomes are package in a feature-pack. And module >> dependencies become package dependencies. Is it any close to the issue you >> described? >> >> On Tue, Oct 3, 2017 at 1:51 AM, Scott Stark wrote: >> >>> Interesting. >>> >>> It brings up a discussion point I have been meaning to raise across the >>> Wildfly and Wildfly-Swarm teams regarding tools for the step before this >>> assembly step of feature-packs and fractions into a distributable archive. >>> >>> The issue I have seen is that when authoring a feature-pack or fraction, >>> it is difficult to know how to configure the module dependencies. One is >>> often starting with GAV dependencies from a spec, and it is difficult to >>> know how those map onto modules in existing feature-packs for fractions. Do >>> we have any tooling in this area to make this task not a trial and error >>> effort? >>> >>> >>> >>> On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet >>> wrote: >>> >>>> Hi, >>>> >>>> For those who can take 7'26 of their time to look at what we can do >>>> with the new provisioning tool to build and share custom feature packs. >>>> >>>> https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 >>>> >>>> >>>> >>>> _______________________________________________ >>>> wildfly-dev mailing list >>>> wildfly-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>> >>> >>> >>> _______________________________________________ >>> wildfly-dev mailing list >>> wildfly-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171004/e8d082d0/attachment-0001.html From bmcwhirt at redhat.com Wed Oct 4 13:30:22 2017 From: bmcwhirt at redhat.com (Bob McWhirter) Date: Wed, 4 Oct 2017 13:30:22 -0400 Subject: [wildfly-dev] [wildfly-swarm-internal] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: My method is to keep a WildFly distribution handy, and grep through the $JBOSS_HOME/modules/? directory, to help find existing ones. If I have to create new ones, it?s just a tedious effort of converting the Maven transitive tree into a transitive module.xml tree. Tedious. -Bob On Wed, Oct 4, 2017 at 1:23 PM, Scott Stark wrote: > Correct. Starting from a pom that contains the artifact dependencies, how > to translate this into an appropriate module.xml for the output fraction is > a trial and error process currently. Does the information exist so that one > could go from GAV and/or package names dependencies to the module that > provides said dependencies from amongst a set of wildfly feature pack? > > On Tue, Oct 3, 2017 at 8:03 AM, Bob McWhirter wrote: > >> I think the issue (at least as I?ve found it) is that we either: >> >> a) scrub around in existing feature-packs and modules/ directory to >> determine if there?s a module.xml matching the thing and version we need or >> >> b) hand-author a module.xml based upon pom.xml, adding a chance to mess >> things up. >> >> -Bob >> >> On Tue, Oct 3, 2017 at 10:37 AM, Alexey Loubyansky < >> alexey.loubyansky at redhat.com> wrote: >> >>> It's not exactly clear to me what issue you are describing. But I can >>> provide some basic info on how feature-packs are authored for the wildfly >>> releases (core, servlet, full). Perhaps then you could ask a more specific >>> question. >>> >>> A feature-pack represents a specific release. So there will be a >>> feature-pack for the core, another one for the servlet distribution and >>> another one for the full one. In feature-packs, modules are organized into >>> packages (which is an atomic unit of content possibly with dependencies on >>> other packages from the same or another feature-pack). >>> When a feature-pack is generated, the packages are generated from the >>> modules. Each module becomes are package in a feature-pack. And module >>> dependencies become package dependencies. Is it any close to the issue you >>> described? >>> >>> On Tue, Oct 3, 2017 at 1:51 AM, Scott Stark wrote: >>> >>>> Interesting. >>>> >>>> It brings up a discussion point I have been meaning to raise across the >>>> Wildfly and Wildfly-Swarm teams regarding tools for the step before this >>>> assembly step of feature-packs and fractions into a distributable archive. >>>> >>>> The issue I have seen is that when authoring a feature-pack or >>>> fraction, it is difficult to know how to configure the module dependencies. >>>> One is often starting with GAV dependencies from a spec, and it is >>>> difficult to know how those map onto modules in existing feature-packs for >>>> fractions. Do we have any tooling in this area to make this task not a >>>> trial and error effort? >>>> >>>> >>>> >>>> On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> For those who can take 7'26 of their time to look at what we can do >>>>> with the new provisioning tool to build and share custom feature packs. >>>>> >>>>> https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> wildfly-dev mailing list >>>>> wildfly-dev at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>>> >>>> >>>> >>>> _______________________________________________ >>>> wildfly-dev mailing list >>>> wildfly-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171004/f5f05b67/attachment.html From alexey.loubyansky at redhat.com Wed Oct 4 16:12:11 2017 From: alexey.loubyansky at redhat.com (Alexey Loubyansky) Date: Wed, 4 Oct 2017 22:12:11 +0200 Subject: [wildfly-dev] [wildfly-swarm-internal] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: In the case of the provisioning tools, we don't generate module.xml files. Modules are provided by the developers/build process. We provide the mechanism to generate packages from the modules and then the feature-pack. When a feature-pack is generated, we know which other feature-packs it depends on. Then when we generate a package from a module we process the module dependencies and figure out on which package(s) from which feature-pack(s) the package we generate should depend on. I am still not sure whether that answers your question since it's formulated in the context of Swarm and I have a trouble translating it into the context of the feature-pack-based provisioning. I am interested in covering your requirements though. So if it makes sense to you let's continue the discussion or schedule a call to clear things out. On Wed, Oct 4, 2017 at 7:23 PM, Scott Stark wrote: > Correct. Starting from a pom that contains the artifact dependencies, how > to translate this into an appropriate module.xml for the output fraction is > a trial and error process currently. Does the information exist so that one > could go from GAV and/or package names dependencies to the module that > provides said dependencies from amongst a set of wildfly feature pack? > > On Tue, Oct 3, 2017 at 8:03 AM, Bob McWhirter wrote: > >> I think the issue (at least as I?ve found it) is that we either: >> >> a) scrub around in existing feature-packs and modules/ directory to >> determine if there?s a module.xml matching the thing and version we need or >> >> b) hand-author a module.xml based upon pom.xml, adding a chance to mess >> things up. >> >> -Bob >> >> On Tue, Oct 3, 2017 at 10:37 AM, Alexey Loubyansky < >> alexey.loubyansky at redhat.com> wrote: >> >>> It's not exactly clear to me what issue you are describing. But I can >>> provide some basic info on how feature-packs are authored for the wildfly >>> releases (core, servlet, full). Perhaps then you could ask a more specific >>> question. >>> >>> A feature-pack represents a specific release. So there will be a >>> feature-pack for the core, another one for the servlet distribution and >>> another one for the full one. In feature-packs, modules are organized into >>> packages (which is an atomic unit of content possibly with dependencies on >>> other packages from the same or another feature-pack). >>> When a feature-pack is generated, the packages are generated from the >>> modules. Each module becomes are package in a feature-pack. And module >>> dependencies become package dependencies. Is it any close to the issue you >>> described? >>> >>> On Tue, Oct 3, 2017 at 1:51 AM, Scott Stark wrote: >>> >>>> Interesting. >>>> >>>> It brings up a discussion point I have been meaning to raise across the >>>> Wildfly and Wildfly-Swarm teams regarding tools for the step before this >>>> assembly step of feature-packs and fractions into a distributable archive. >>>> >>>> The issue I have seen is that when authoring a feature-pack or >>>> fraction, it is difficult to know how to configure the module dependencies. >>>> One is often starting with GAV dependencies from a spec, and it is >>>> difficult to know how those map onto modules in existing feature-packs for >>>> fractions. Do we have any tooling in this area to make this task not a >>>> trial and error effort? >>>> >>>> >>>> >>>> On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> For those who can take 7'26 of their time to look at what we can do >>>>> with the new provisioning tool to build and share custom feature packs. >>>>> >>>>> https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> wildfly-dev mailing list >>>>> wildfly-dev at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>>> >>>> >>>> >>>> _______________________________________________ >>>> wildfly-dev mailing list >>>> wildfly-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171004/24bd5e5b/attachment.html From cdewolf at redhat.com Thu Oct 5 17:46:04 2017 From: cdewolf at redhat.com (Carlo de Wolf) Date: Thu, 5 Oct 2017 23:46:04 +0200 Subject: [wildfly-dev] [wildfly-swarm-internal] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: Basically a project build doesn't produce the stuff that can be provisioned into a runtime environment. Be it WildFly Swarm, WildFly Modules or a more "alien" runtime, Fedora RPMs. Carlo On 10/04/2017 10:12 PM, Alexey Loubyansky wrote: > In the case of the provisioning tools, we don't generate module.xml > files. Modules are provided by the developers/build process. We > provide the mechanism to generate packages from the modules and then > the feature-pack. > When a feature-pack is generated, we know which other feature-packs it > depends on. Then when we generate a package from a module we process > the module dependencies and figure out on which package(s) from which > feature-pack(s) the package we generate should depend on. > > I am still not sure whether that answers your question since it's > formulated in the context of Swarm and I have a trouble translating it > into the context of the feature-pack-based provisioning. I am > interested in covering your requirements though. So if it makes sense > to you let's continue the discussion or schedule a call to clear > things out. > > On Wed, Oct 4, 2017 at 7:23 PM, Scott Stark > wrote: > > Correct. Starting from a pom that contains the artifact > dependencies, how to translate this into an appropriate module.xml > for the output fraction is a trial and error process currently. > Does the information exist so that one could go from GAV and/or > package names dependencies to the module that provides said > dependencies from amongst a set of wildfly feature pack? > > On Tue, Oct 3, 2017 at 8:03 AM, Bob McWhirter > wrote: > > I think the issue (at least as I?ve found it) is that we either: > > a) scrub around in existing feature-packs and modules/ > directory to determine if there?s a module.xml matching the > thing and version we need or > > b) hand-author a module.xml based upon pom.xml, adding a > chance to mess things up. > > -Bob > > On Tue, Oct 3, 2017 at 10:37 AM, Alexey Loubyansky > > wrote: > > It's not exactly clear to me what issue you are > describing. But I can provide some basic info on how > feature-packs are authored for the wildfly releases (core, > servlet, full). Perhaps then you could ask a more specific > question. > > A feature-pack represents a specific release. So there > will be a feature-pack for the core, another one for the > servlet distribution and another one for the full one. In > feature-packs, modules are organized into packages (which > is an atomic unit of content possibly with dependencies on > other packages from the same or another feature-pack). > When a feature-pack is generated, the packages are > generated from the modules. Each module becomes are > package in a feature-pack. And module dependencies become > package dependencies. Is it any close to the issue you > described? > > On Tue, Oct 3, 2017 at 1:51 AM, Scott Stark > > wrote: > > Interesting. > > It brings up a discussion point I have been meaning to > raise across the Wildfly and Wildfly-Swarm teams > regarding tools for the step before this assembly step > of feature-packs and fractions into a distributable > archive. > > The issue I have seen is that when authoring a > feature-pack or fraction, it is difficult to know how > to configure the module dependencies. One is often > starting with GAV dependencies from a spec, and it is > difficult to know how those map onto modules in > existing feature-packs for fractions. Do we have any > tooling in this area to make this task not a trial and > error effort? > > > > On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet > > wrote: > > Hi, > > For those who can take 7'26 of their time to look > at what we can do with the new provisioning tool > to build and share custom feature packs. > > https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 > > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/wildfly-dev > > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/wildfly-dev > > > > > > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171005/03fbedc6/attachment-0001.html From sstark at redhat.com Sat Oct 7 15:30:39 2017 From: sstark at redhat.com (Scott Stark) Date: Sat, 7 Oct 2017 12:30:39 -0700 Subject: [wildfly-dev] [wildfly-swarm-internal] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <76ee03bf-47d6-7340-c7c0-11b88efe6b4b@redhat.com> Message-ID: The usecase is that someone is authoring a new swarm fraction, and they have a set of known GAV style dependencies as well as other swarm fraction dependencies and wildfly feature-pack dependencies. What the appropriate module.xml for the new fraction should be is a tool I would like to be able to create. The output module.xml has dependencies on existing modules exported by the dependent fractions and feature-packs along with the GAVs as local resources that are unique to the fraction. Does the jandex layer support this? On Wed, Oct 4, 2017 at 1:12 PM, Alexey Loubyansky < alexey.loubyansky at redhat.com> wrote: > In the case of the provisioning tools, we don't generate module.xml files. > Modules are provided by the developers/build process. We provide the > mechanism to generate packages from the modules and then the feature-pack. > When a feature-pack is generated, we know which other feature-packs it > depends on. Then when we generate a package from a module we process the > module dependencies and figure out on which package(s) from which > feature-pack(s) the package we generate should depend on. > > I am still not sure whether that answers your question since it's > formulated in the context of Swarm and I have a trouble translating it into > the context of the feature-pack-based provisioning. I am interested in > covering your requirements though. So if it makes sense to you let's > continue the discussion or schedule a call to clear things out. > > On Wed, Oct 4, 2017 at 7:23 PM, Scott Stark wrote: > >> Correct. Starting from a pom that contains the artifact dependencies, how >> to translate this into an appropriate module.xml for the output fraction is >> a trial and error process currently. Does the information exist so that one >> could go from GAV and/or package names dependencies to the module that >> provides said dependencies from amongst a set of wildfly feature pack? >> >> On Tue, Oct 3, 2017 at 8:03 AM, Bob McWhirter >> wrote: >> >>> I think the issue (at least as I?ve found it) is that we either: >>> >>> a) scrub around in existing feature-packs and modules/ directory to >>> determine if there?s a module.xml matching the thing and version we need or >>> >>> b) hand-author a module.xml based upon pom.xml, adding a chance to mess >>> things up. >>> >>> -Bob >>> >>> On Tue, Oct 3, 2017 at 10:37 AM, Alexey Loubyansky < >>> alexey.loubyansky at redhat.com> wrote: >>> >>>> It's not exactly clear to me what issue you are describing. But I can >>>> provide some basic info on how feature-packs are authored for the wildfly >>>> releases (core, servlet, full). Perhaps then you could ask a more specific >>>> question. >>>> >>>> A feature-pack represents a specific release. So there will be a >>>> feature-pack for the core, another one for the servlet distribution and >>>> another one for the full one. In feature-packs, modules are organized into >>>> packages (which is an atomic unit of content possibly with dependencies on >>>> other packages from the same or another feature-pack). >>>> When a feature-pack is generated, the packages are generated from the >>>> modules. Each module becomes are package in a feature-pack. And module >>>> dependencies become package dependencies. Is it any close to the issue you >>>> described? >>>> >>>> On Tue, Oct 3, 2017 at 1:51 AM, Scott Stark wrote: >>>> >>>>> Interesting. >>>>> >>>>> It brings up a discussion point I have been meaning to raise across >>>>> the Wildfly and Wildfly-Swarm teams regarding tools for the step before >>>>> this assembly step of feature-packs and fractions into a distributable >>>>> archive. >>>>> >>>>> The issue I have seen is that when authoring a feature-pack or >>>>> fraction, it is difficult to know how to configure the module dependencies. >>>>> One is often starting with GAV dependencies from a spec, and it is >>>>> difficult to know how those map onto modules in existing feature-packs for >>>>> fractions. Do we have any tooling in this area to make this task not a >>>>> trial and error effort? >>>>> >>>>> >>>>> >>>>> On Mon, Oct 2, 2017 at 7:34 AM, Emmanuel Hugonnet >>>> > wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> For those who can take 7'26 of their time to look at what we can do >>>>>> with the new provisioning tool to build and share custom feature packs. >>>>>> >>>>>> https://www.dropbox.com/s/84133sgsjef7pqs/feature_pack.mp4?dl=0 >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> wildfly-dev mailing list >>>>>> wildfly-dev at lists.jboss.org >>>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> wildfly-dev mailing list >>>>> wildfly-dev at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171007/938915fd/attachment.html From ehugonne at redhat.com Tue Oct 10 12:32:59 2017 From: ehugonne at redhat.com (Emmanuel Hugonnet) Date: Tue, 10 Oct 2017 18:32:59 +0200 Subject: [wildfly-dev] Updating WildFly instance with the Provisioning Tool In-Reply-To: References: <1f8c6b00-ed9c-6325-9c7d-8ee6f76f91a6@redhat.com> <666DFEF0-6FE0-4842-BE7B-F02E8D15674C@redhat.com> Message-ID: <8f51c6b1-7891-f006-3b49-967629811818@redhat.com> Hi, This is a second video demonstrating the update of a customized instance : https://www.dropbox.com/s/b9ma59wtwnrz5ep/update.mp4?dl=0 Please note that this is still a POC and it is run in verbose mode but it shows the diff of textual files and what happens in case of failure. I have introduced the notion of strategy when merging fails BUT this is not currently enabled ;) Cheers, Emmanuel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature Url : http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171010/8c516235/attachment.bin From ebenzacar at gmail.com Fri Oct 13 17:48:55 2017 From: ebenzacar at gmail.com (Eric B) Date: Fri, 13 Oct 2017 17:48:55 -0400 Subject: [wildfly-dev] Is there a single maven BOM artifact I can use to get/build the entire wildfly ee server? Message-ID: I'm trying to debug some code, and I am often hitting classes in Wildfly/Undertow/etc in my stack that I don't have the source code for. I'd love to be able to add a dependency in my pom.xml so that Eclipse will automatically d/l the sources from maven central for me and add them to my debugger. I'm looking for an artifact that I'd be able to list something like: wildfly org.wildfly 10.1.0 provided pom That would then download all the sources for me, and I'd be in business. Is there something like this BOM available for wildfly? Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171013/96df313b/attachment.html From tomaz.cerar at gmail.com Sat Oct 14 16:26:30 2017 From: tomaz.cerar at gmail.com (=?utf-8?Q?Toma=C5=BE_Cerar?=) Date: Sat, 14 Oct 2017 22:26:30 +0200 Subject: [wildfly-dev] Is there a single maven BOM artifact I can use toget/build the entire wildfly ee server? In-Reply-To: References: Message-ID: <59e272f4.2fb9df0a.8d596.3131@mx.google.com> See https://github.com/wildfly/boms If you want boms that manage artifacts & versions for everything app developer would need. Such as servlet / undertow / spec api / etc. I doubt you actually need widfly server dependencies but only EE with friends ones. -- tomaz From: Eric B Sent: sobota, 14. oktober 2017 02:39 To: wildfly-dev at lists.jboss.org Subject: [wildfly-dev] Is there a single maven BOM artifact I can use toget/build the entire wildfly ee server? I'm trying to debug some code, and I am often hitting classes in Wildfly/Undertow/etc in my stack that I don't have the source code for. I'd love to be able to add a dependency in my pom.xml so that Eclipse will automatically d/l the sources from maven central for me and add them to my debugger.? I'm looking for an artifact that I'd be able to list something like: ? ?wildfly ? ?org.wildfly ? ?10.1.0 ? ?provided ? pom That would then download all the sources for me, and I'd be in business. Is there something like this BOM available for wildfly? Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171014/d02cf803/attachment-0001.html From arjan.tijms at gmail.com Sat Oct 14 18:45:43 2017 From: arjan.tijms at gmail.com (arjan tijms) Date: Sat, 14 Oct 2017 23:45:43 +0100 Subject: [wildfly-dev] Is there a single maven BOM artifact I can use toget/build the entire wildfly ee server? In-Reply-To: <59e272f4.2fb9df0a.8d596.3131@mx.google.com> References: <59e272f4.2fb9df0a.8d596.3131@mx.google.com> Message-ID: Hi, On Sat, Oct 14, 2017 at 9:26 PM, Toma? Cerar wrote: > I doubt you actually need widfly server dependencies but only EE with > friends ones. > In many cases somewhat more advanced developers actually want all the server dependencies. This is absolutely crucial for debugging. I've needed this many times over in my role as app developer. Kind regards, Arjan Tijms > > > -- > > tomaz > > > > *From: *Eric B > *Sent: *sobota, 14. oktober 2017 02:39 > *To: *wildfly-dev at lists.jboss.org > *Subject: *[wildfly-dev] Is there a single maven BOM artifact I can use > toget/build the entire wildfly ee server? > > > > I'm trying to debug some code, and I am often hitting classes in > Wildfly/Undertow/etc in my stack that I don't have the source code for. > > > > I'd love to be able to add a dependency in my pom.xml so that Eclipse will > automatically d/l the sources from maven central for me and add them to my > debugger. I'm looking for an artifact that I'd be able to list something > like: > > > > > > wildfly > > org.wildfly > > 10.1.0 > > provided > > pom > > > > > > > > That would then download all the sources for me, and I'd be in business. > > > > Is there something like this BOM available for wildfly? > > > > Thanks, > > > Eric > > > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171014/9ae5b8e2/attachment.html From stuart.w.douglas at gmail.com Sun Oct 15 04:52:28 2017 From: stuart.w.douglas at gmail.com (Stuart Douglas) Date: Sun, 15 Oct 2017 10:52:28 +0200 Subject: [wildfly-dev] Is there a single maven BOM artifact I can use toget/build the entire wildfly ee server? In-Reply-To: References: <59e272f4.2fb9df0a.8d596.3131@mx.google.com> Message-ID: I think adding a dependency on wildfly-feature-pack should do what you are after. Stuart On Sun, Oct 15, 2017 at 12:45 AM, arjan tijms wrote: > Hi, > > On Sat, Oct 14, 2017 at 9:26 PM, Toma? Cerar > wrote: > >> I doubt you actually need widfly server dependencies but only EE with >> friends ones. >> > > In many cases somewhat more advanced developers actually want all the > server dependencies. This is absolutely crucial for debugging. I've needed > this many times over in my role as app developer. > > Kind regards, > Arjan Tijms > > > > >> >> >> -- >> >> tomaz >> >> >> >> *From: *Eric B >> *Sent: *sobota, 14. oktober 2017 02:39 >> *To: *wildfly-dev at lists.jboss.org >> *Subject: *[wildfly-dev] Is there a single maven BOM artifact I can use >> toget/build the entire wildfly ee server? >> >> >> >> I'm trying to debug some code, and I am often hitting classes in >> Wildfly/Undertow/etc in my stack that I don't have the source code for. >> >> >> >> I'd love to be able to add a dependency in my pom.xml so that Eclipse >> will automatically d/l the sources from maven central for me and add them >> to my debugger. I'm looking for an artifact that I'd be able to list >> something like: >> >> >> >> >> >> wildfly >> >> org.wildfly >> >> 10.1.0 >> >> provided >> >> pom >> >> >> >> >> >> >> >> That would then download all the sources for me, and I'd be in business. >> >> >> >> Is there something like this BOM available for wildfly? >> >> >> >> Thanks, >> >> >> Eric >> >> >> >> >> >> _______________________________________________ >> wildfly-dev mailing list >> wildfly-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/wildfly-dev >> > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171015/d22772f9/attachment.html From rsvoboda at redhat.com Mon Oct 16 03:00:19 2017 From: rsvoboda at redhat.com (Rostislav Svoboda) Date: Mon, 16 Oct 2017 03:00:19 -0400 (EDT) Subject: [wildfly-dev] Is there a single maven BOM artifact I can use toget/build the entire wildfly ee server? In-Reply-To: References: <59e272f4.2fb9df0a.8d596.3131@mx.google.com> Message-ID: <1881400196.29112314.1508137219626.JavaMail.zimbra@redhat.com> > I think adding a dependency on wildfly-feature-pack should do what you are > after. +1 example: https://paste.fedoraproject.org/paste/Q4p9Puw7vfsBnZtc04S6Mg Rostislav > Stuart > > On Sun, Oct 15, 2017 at 12:45 AM, arjan tijms < arjan.tijms at gmail.com > > wrote: > > > > Hi, > > On Sat, Oct 14, 2017 at 9:26 PM, Toma? Cerar < tomaz.cerar at gmail.com > wrote: > > > > > > I doubt you actually need widfly server dependencies but only EE with friends > ones. > > In many cases somewhat more advanced developers actually want all the server > dependencies. This is absolutely crucial for debugging. I've needed this > many times over in my role as app developer. > > Kind regards, > Arjan Tijms > > > > > > > > > > > > -- > > tomaz > > > > > From: Eric B > Sent: sobota, 14. oktober 2017 02:39 > To: wildfly-dev at lists.jboss.org > Subject: [wildfly-dev] Is there a single maven BOM artifact I can use > toget/build the entire wildfly ee server? > > > > > > I'm trying to debug some code, and I am often hitting classes in > Wildfly/Undertow/etc in my stack that I don't have the source code for. > > > > > > I'd love to be able to add a dependency in my pom.xml so that Eclipse will > automatically d/l the sources from maven central for me and add them to my > debugger. I'm looking for an artifact that I'd be able to list something > like: > > > > > > > > > wildfly > > > org.wildfly > > > 10.1.0 > > > provided > > > pom > > > > > > > > > > > > That would then download all the sources for me, and I'd be in business. > > > > > > Is there something like this BOM available for wildfly? > > > > > > Thanks, > > > > Eric > > > > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev From ebenzacar at gmail.com Tue Oct 17 22:00:21 2017 From: ebenzacar at gmail.com (Eric B) Date: Tue, 17 Oct 2017 22:00:21 -0400 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR Message-ID: Hi, I'm looking to use AspectJ Load Time Weaving with Wildfly 10. Looking around at some posts, it is a little complicated to get Wildfly launched properly with the AJ weaver due to the way the AJ library intializes the logging subsystem differently than WF. Digging around, I found a config that actually works. It is documented here (obviously some of the class names/versions have to change): https://github.com/ChienChingLee/How-to-launch-Wildfly-9.0-with-AspectJ-1.8-LTW But I'm not a fan of changing my conf file to something that has hardcoded paths/jar names in it - for example adding: -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a way to dynamically attach the weaver to the JVM. Very cool. https://www.eclipse.org/aspectj/doc/released/README-187.html But in order to use the LTW effectively, I need to ensure that the weaver is loaded prior to WF scanning and loading any of my classes (EJB, annotated beans, pojos, etc). But I have no ideas how to do that. In the case of a console application, it is pretty straight forward - make it the first item in the application's main() method. But in the case of a JEE app, I don't know of any main() equivalent. Is there a way to hook into the classloading mechanism of WF instead to tell it to load the weaver if it isn't already loaded? Can this be done from within the EAR deployment? Or is there a single point of entry that WF accesses before scanning any of the classes in the EAR? Or is there a simpler way of configuring or attaching the AJ Weaver? I did find an old ticket (https://issues.jboss.org/browse/WFLY-895) that related to this issue, but it is marked as WONT FIX. Am not sure of the best approach at this point. Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171017/c3d16683/attachment-0001.html From tomaz.cerar at gmail.com Wed Oct 18 10:16:42 2017 From: tomaz.cerar at gmail.com (=?utf-8?Q?Toma=C5=BE_Cerar?=) Date: Wed, 18 Oct 2017 16:16:42 +0200 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR In-Reply-To: References: Message-ID: <59e7624a.8e841c0a.e1225.dbaa@mx.google.com> You could try running server with -Dorg.wildfly.logging.skipLogManagerCheck=true parameter which should skip log manager check. But it could also result in issues with logging. -- tomaz From: Eric B Sent: sreda, 18. oktober 2017 14:40 To: wildfly-dev at lists.jboss.org Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR Hi, I'm looking to use AspectJ Load Time Weaving with Wildfly 10.? Looking around at some posts, it is a little complicated to get Wildfly launched properly with the AJ weaver due to the way the AJ library intializes the logging subsystem differently than WF. Digging around, I found a config that actually works.? It is documented here (obviously some of the class names/versions have to change):?https://github.com/ChienChingLee/How-to-launch-Wildfly-9.0-with-AspectJ-1.8-LTW But I'm not a fan of changing my conf file to something that has hardcoded paths/jar names in it - for example adding: ?-Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar? Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a way to dynamically attach the weaver to the JVM.? Very cool.??https://www.eclipse.org/aspectj/doc/released/README-187.html?? But in order to use the LTW effectively, I need to ensure that the weaver is loaded prior to WF scanning and loading any of my classes (EJB, annotated beans, pojos, etc).? But I have no ideas how to do that. In the case of a console application, it is pretty straight forward - make it the first item in the application's main() method.? But in the case of a JEE app, I don't know of any main() equivalent. Is there a way to hook into the classloading mechanism of WF instead to tell it to load the weaver if it isn't already loaded?? Can this be done from within the EAR deployment?? Or is there a single point of entry that WF accesses before scanning any of the classes in the EAR?? Or is there a simpler way of configuring or attaching the AJ Weaver?? I did find an old ticket (https://issues.jboss.org/browse/WFLY-895) that related to this issue, but it is marked as WONT FIX. Am not sure of the best approach at this point. Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171018/566587c4/attachment.html From stuart.w.douglas at gmail.com Wed Oct 18 10:55:42 2017 From: stuart.w.douglas at gmail.com (Stuart Douglas) Date: Wed, 18 Oct 2017 16:55:42 +0200 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR In-Reply-To: References: Message-ID: So one possibility that comes to mind would be to create a small deployment that does the aspectJ attach on deploy (e.g. in a @PostConstruct method of an @Startup EJB). You could then add an inter-deployment dependency on this deployment to all your other deployments, which should ensure that this code is run before other modules are created/loaded. Stuart On Wed, Oct 18, 2017 at 4:00 AM, Eric B wrote: > Hi, > > I'm looking to use AspectJ Load Time Weaving with Wildfly 10. Looking > around at some posts, it is a little complicated to get Wildfly launched > properly with the AJ weaver due to the way the AJ library intializes the > logging subsystem differently than WF. > > Digging around, I found a config that actually works. It is documented > here (obviously some of the class names/versions have to change): > https://github.com/ChienChingLee/How-to-launch- > Wildfly-9.0-with-AspectJ-1.8-LTW > > But I'm not a fan of changing my conf file to something that has hardcoded > paths/jar names in it - for example adding: > -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/ > base/org/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar > > > Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a way > to dynamically attach the weaver to the JVM. Very cool. > https://www.eclipse.org/aspectj/doc/released/README-187.html > But in order to use the LTW effectively, I need to ensure that the weaver > is loaded prior to WF scanning and loading any of my classes (EJB, > annotated beans, pojos, etc). But I have no ideas how to do that. > > In the case of a console application, it is pretty straight forward - make > it the first item in the application's main() method. But in the case of a > JEE app, I don't know of any main() equivalent. > > > Is there a way to hook into the classloading mechanism of WF instead to > tell it to load the weaver if it isn't already loaded? Can this be done > from within the EAR deployment? Or is there a single point of entry that > WF accesses before scanning any of the classes in the EAR? Or is there a > simpler way of configuring or attaching the AJ Weaver? I did find an old > ticket (https://issues.jboss.org/browse/WFLY-895) that related to this > issue, but it is marked as WONT FIX. > > Am not sure of the best approach at this point. > > > Thanks, > > Eric > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171018/213d29d6/attachment.html From ebenzacar at gmail.com Wed Oct 18 14:47:13 2017 From: ebenzacar at gmail.com (Eric B) Date: Wed, 18 Oct 2017 14:47:13 -0400 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR In-Reply-To: References: Message-ID: Thanks Stuart - I hadn't thought of that. It does bring up a couple of questions/concerns though: 1) The AspectJ attach EJB would need to be in an independent module from the rest of the application (minor detail) 2) The EJB required is of a singleton pattern. How would that work in a clustered environment? A @Singleton @Startup EJB would only be spawned in a single JVM - other nodes in the cluster won't trigger the @PostConstruct method of it and consquently not load the weaver. Is there a way to force eager initialization of a @Stateless bean instead? Baring that, I did run across a blog entry that indicates the use of the Observer pattern listening for the ApplicationScope ( https://rmannibucau.wordpress.com/2015/03/10/cdi-and-startup/). But I suspect that at that point the beans have already been scanned. @ApplicationScoped public class ProvisioningDataForApplicationLifecycle { private final Map users = new HashMap<>(); // + getter public void init(@Observes @Initialized(ApplicationScoped.class) Object init) { users.put("cdi", new User("cdi", "1.1")); users.put("deltaspike", new User("deltaspike", "1.3")); } public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object init) { users.clear(); } } This seems fairly like a complex solution to a fairly simple ask. Or am I misunderstanding the @Singleton pattern? Thanks, Eric On Wed, Oct 18, 2017 at 10:55 AM, Stuart Douglas wrote: > So one possibility that comes to mind would be to create a small > deployment that does the aspectJ attach on deploy (e.g. in a @PostConstruct > method of an @Startup EJB). > > You could then add an inter-deployment dependency on this deployment to > all your other deployments, which should ensure that this code is run > before other modules are created/loaded. > > Stuart > > On Wed, Oct 18, 2017 at 4:00 AM, Eric B wrote: > >> Hi, >> >> I'm looking to use AspectJ Load Time Weaving with Wildfly 10. Looking >> around at some posts, it is a little complicated to get Wildfly launched >> properly with the AJ weaver due to the way the AJ library intializes the >> logging subsystem differently than WF. >> >> Digging around, I found a config that actually works. It is documented >> here (obviously some of the class names/versions have to change): >> https://github.com/ChienChingLee/How-to-launch-Wild >> fly-9.0-with-AspectJ-1.8-LTW >> >> But I'm not a fan of changing my conf file to something that has >> hardcoded paths/jar names in it - for example adding: >> -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/ >> org/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar >> >> >> Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a way >> to dynamically attach the weaver to the JVM. Very cool. >> https://www.eclipse.org/aspectj/doc/released/README-187.html >> But in order to use the LTW effectively, I need to ensure that the weaver >> is loaded prior to WF scanning and loading any of my classes (EJB, >> annotated beans, pojos, etc). But I have no ideas how to do that. >> >> In the case of a console application, it is pretty straight forward - >> make it the first item in the application's main() method. But in the case >> of a JEE app, I don't know of any main() equivalent. >> >> >> Is there a way to hook into the classloading mechanism of WF instead to >> tell it to load the weaver if it isn't already loaded? Can this be done >> from within the EAR deployment? Or is there a single point of entry that >> WF accesses before scanning any of the classes in the EAR? Or is there a >> simpler way of configuring or attaching the AJ Weaver? I did find an old >> ticket (https://issues.jboss.org/browse/WFLY-895) that related to this >> issue, but it is marked as WONT FIX. >> >> Am not sure of the best approach at this point. >> >> >> Thanks, >> >> Eric >> >> _______________________________________________ >> wildfly-dev mailing list >> wildfly-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/wildfly-dev >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171018/f6f25247/attachment-0001.html From stuart.w.douglas at gmail.com Wed Oct 18 15:37:51 2017 From: stuart.w.douglas at gmail.com (Stuart Douglas) Date: Wed, 18 Oct 2017 21:37:51 +0200 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR In-Reply-To: References: Message-ID: On Wed, Oct 18, 2017 at 8:47 PM, Eric B wrote: > Thanks Stuart - I hadn't thought of that. > > It does bring up a couple of questions/concerns though: > 1) The AspectJ attach EJB would need to be in an independent module from > the rest of the application (minor detail) > Yes, not getting around that. > 2) The EJB required is of a singleton pattern. How would that work in a > clustered environment? A @Singleton @Startup EJB would only be spawned in > a single JVM - other nodes in the cluster won't trigger the @PostConstruct > method of it and consquently not load the weaver. > Just don't make it clustered, you want one per JVM not one per cluster. Stuart > > Is there a way to force eager initialization of a @Stateless bean > instead? > > > Baring that, I did run across a blog entry that indicates the use of the > Observer pattern listening for the ApplicationScope (https://rmannibucau. > wordpress.com/2015/03/10/cdi-and-startup/). But I suspect that at that > point the beans have already been scanned. > > @ApplicationScoped > public class ProvisioningDataForApplicationLifecycle { > private final Map users = new HashMap<>(); // + getter > > public void init(@Observes @Initialized(ApplicationScoped.class) > Object init) { > users.put("cdi", new User("cdi", "1.1")); > users.put("deltaspike", new User("deltaspike", "1.3")); > } > > public void destroy(@Observes @Destroyed(ApplicationScoped.class) > Object init) { > users.clear(); > } > } > > > > This seems fairly like a complex solution to a fairly simple ask. Or am I > misunderstanding the @Singleton pattern? > > Thanks, > > Eric > > > On Wed, Oct 18, 2017 at 10:55 AM, Stuart Douglas < > stuart.w.douglas at gmail.com> wrote: > >> So one possibility that comes to mind would be to create a small >> deployment that does the aspectJ attach on deploy (e.g. in a @PostConstruct >> method of an @Startup EJB). >> >> You could then add an inter-deployment dependency on this deployment to >> all your other deployments, which should ensure that this code is run >> before other modules are created/loaded. >> >> Stuart >> >> On Wed, Oct 18, 2017 at 4:00 AM, Eric B wrote: >> >>> Hi, >>> >>> I'm looking to use AspectJ Load Time Weaving with Wildfly 10. Looking >>> around at some posts, it is a little complicated to get Wildfly launched >>> properly with the AJ weaver due to the way the AJ library intializes the >>> logging subsystem differently than WF. >>> >>> Digging around, I found a config that actually works. It is documented >>> here (obviously some of the class names/versions have to change): >>> https://github.com/ChienChingLee/How-to-launch-Wild >>> fly-9.0-with-AspectJ-1.8-LTW >>> >>> But I'm not a fan of changing my conf file to something that has >>> hardcoded paths/jar names in it - for example adding: >>> -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/or >>> g/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar >>> >>> >>> Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a >>> way to dynamically attach the weaver to the JVM. Very cool. >>> https://www.eclipse.org/aspectj/doc/released/README-187.html >>> But in order to use the LTW effectively, I need to ensure that the >>> weaver is loaded prior to WF scanning and loading any of my classes (EJB, >>> annotated beans, pojos, etc). But I have no ideas how to do that. >>> >>> In the case of a console application, it is pretty straight forward - >>> make it the first item in the application's main() method. But in the case >>> of a JEE app, I don't know of any main() equivalent. >>> >>> >>> Is there a way to hook into the classloading mechanism of WF instead to >>> tell it to load the weaver if it isn't already loaded? Can this be done >>> from within the EAR deployment? Or is there a single point of entry that >>> WF accesses before scanning any of the classes in the EAR? Or is there a >>> simpler way of configuring or attaching the AJ Weaver? I did find an old >>> ticket (https://issues.jboss.org/browse/WFLY-895) that related to this >>> issue, but it is marked as WONT FIX. >>> >>> Am not sure of the best approach at this point. >>> >>> >>> Thanks, >>> >>> Eric >>> >>> _______________________________________________ >>> wildfly-dev mailing list >>> wildfly-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171018/385c1b04/attachment-0001.html From ebenzacar at gmail.com Wed Oct 18 15:57:23 2017 From: ebenzacar at gmail.com (Eric B) Date: Wed, 18 Oct 2017 15:57:23 -0400 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR In-Reply-To: References: Message-ID: On Wed, Oct 18, 2017 at 3:37 PM, Stuart Douglas wrote: > > >> 2) The EJB required is of a singleton pattern. How would that work in a >> clustered environment? A @Singleton @Startup EJB would only be spawned in >> a single JVM - other nodes in the cluster won't trigger the @PostConstruct >> method of it and consquently not load the weaver. >> > > Just don't make it clustered, you want one per JVM not one per cluster. > Am I missing something in my understanding of JEE specs? I thought the entire principle of the @Singleton was to ensure only a single EJB in the entire cluster. Hence the Singleton subsystem? As per the docs ( https://docs.jboss.org/author/display/WFLY10/HA+Singleton+Features): In general, an HA or clustered singleton is a service that exists on multiple nodes in a cluster, but is active on just a single node at any given time. If the node providing the service fails or is shut down, a new singleton provider is chosen and started. Is it as simple as setting in the deployment descriptor not to cluster the @Singleton? ie: in a jboss-ejb3.xml: AspectJWeaverLoader false Thanks! Eric > Stuart > >> >> Is there a way to force eager initialization of a @Stateless bean >> instead? >> >> >> Baring that, I did run across a blog entry that indicates the use of the >> Observer pattern listening for the ApplicationScope ( >> https://rmannibucau.wordpress.com/2015/03/10/cdi-and-startup/). But I >> suspect that at that point the beans have already been scanned. >> >> @ApplicationScoped >> public class ProvisioningDataForApplicationLifecycle { >> private final Map users = new HashMap<>(); // + getter >> >> public void init(@Observes @Initialized(ApplicationScoped.class) >> Object init) { >> users.put("cdi", new User("cdi", "1.1")); >> users.put("deltaspike", new User("deltaspike", "1.3")); >> } >> >> public void destroy(@Observes @Destroyed(ApplicationScoped.class) >> Object init) { >> users.clear(); >> } >> } >> >> >> >> This seems fairly like a complex solution to a fairly simple ask. Or am >> I misunderstanding the @Singleton pattern? >> >> Thanks, >> >> Eric >> >> >> On Wed, Oct 18, 2017 at 10:55 AM, Stuart Douglas < >> stuart.w.douglas at gmail.com> wrote: >> >>> So one possibility that comes to mind would be to create a small >>> deployment that does the aspectJ attach on deploy (e.g. in a @PostConstruct >>> method of an @Startup EJB). >>> >>> You could then add an inter-deployment dependency on this deployment to >>> all your other deployments, which should ensure that this code is run >>> before other modules are created/loaded. >>> >>> Stuart >>> >>> On Wed, Oct 18, 2017 at 4:00 AM, Eric B wrote: >>> >>>> Hi, >>>> >>>> I'm looking to use AspectJ Load Time Weaving with Wildfly 10. Looking >>>> around at some posts, it is a little complicated to get Wildfly launched >>>> properly with the AJ weaver due to the way the AJ library intializes the >>>> logging subsystem differently than WF. >>>> >>>> Digging around, I found a config that actually works. It is documented >>>> here (obviously some of the class names/versions have to change): >>>> https://github.com/ChienChingLee/How-to-launch-Wild >>>> fly-9.0-with-AspectJ-1.8-LTW >>>> >>>> But I'm not a fan of changing my conf file to something that has >>>> hardcoded paths/jar names in it - for example adding: >>>> -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/or >>>> g/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar >>>> >>>> >>>> Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a >>>> way to dynamically attach the weaver to the JVM. Very cool. >>>> https://www.eclipse.org/aspectj/doc/released/README-187.html >>>> But in order to use the LTW effectively, I need to ensure that the >>>> weaver is loaded prior to WF scanning and loading any of my classes (EJB, >>>> annotated beans, pojos, etc). But I have no ideas how to do that. >>>> >>>> In the case of a console application, it is pretty straight forward - >>>> make it the first item in the application's main() method. But in the case >>>> of a JEE app, I don't know of any main() equivalent. >>>> >>>> >>>> Is there a way to hook into the classloading mechanism of WF instead to >>>> tell it to load the weaver if it isn't already loaded? Can this be done >>>> from within the EAR deployment? Or is there a single point of entry that >>>> WF accesses before scanning any of the classes in the EAR? Or is there a >>>> simpler way of configuring or attaching the AJ Weaver? I did find an old >>>> ticket (https://issues.jboss.org/browse/WFLY-895) that related to this >>>> issue, but it is marked as WONT FIX. >>>> >>>> Am not sure of the best approach at this point. >>>> >>>> >>>> Thanks, >>>> >>>> Eric >>>> >>>> _______________________________________________ >>>> wildfly-dev mailing list >>>> wildfly-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171018/5b5480a0/attachment-0001.html From brian.stansberry at redhat.com Wed Oct 18 16:01:36 2017 From: brian.stansberry at redhat.com (Brian Stansberry) Date: Wed, 18 Oct 2017 15:01:36 -0500 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR In-Reply-To: References: Message-ID: My interpretation is you are not interested in weaving any classes that are provided by the server, so the basic requirement is to be able to do your integration before any processing of your deployment starts. A possibility is to use some hooks we've added in WildFly 11 that allow you to register listeners for process lifecycle events: 1) A JMX listener: https://developer.jboss.org/wiki/JMXServerLifecycleEvents 2) A non-jmx variant: https://docs.jboss.org/author/display/WFLY/Core+Management+Subsystem+Configuration The problem with using either of these to do your registration is the events are asynchronous, so the server is moving on with boot while your code is getting the notification. So you would have a race between your code setting things up and the boot moving on to deployment. A hacky workaround to that is to start the server suspended (also new in WF 11, done via e.g. bin/standalone.sh --start-mode=suspend) and without the deployment in the config (if with it there but not enabled). So you get the notification and do your stuff, and then add or enable the deployment and finally use the CLI ":resume" operation to bring the server to normal state. But, then you'd have to reverse that when stopping or reloading the server. On Tue, Oct 17, 2017 at 9:00 PM, Eric B wrote: > Hi, > > I'm looking to use AspectJ Load Time Weaving with Wildfly 10. Looking > around at some posts, it is a little complicated to get Wildfly launched > properly with the AJ weaver due to the way the AJ library intializes the > logging subsystem differently than WF. > > Digging around, I found a config that actually works. It is documented > here (obviously some of the class names/versions have to change): > https://github.com/ChienChingLee/How-to-launch- > Wildfly-9.0-with-AspectJ-1.8-LTW > > But I'm not a fan of changing my conf file to something that has hardcoded > paths/jar names in it - for example adding: > -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/ > base/org/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar > > > Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a way > to dynamically attach the weaver to the JVM. Very cool. > https://www.eclipse.org/aspectj/doc/released/README-187.html > But in order to use the LTW effectively, I need to ensure that the weaver > is loaded prior to WF scanning and loading any of my classes (EJB, > annotated beans, pojos, etc). But I have no ideas how to do that. > > In the case of a console application, it is pretty straight forward - make > it the first item in the application's main() method. But in the case of a > JEE app, I don't know of any main() equivalent. > > > Is there a way to hook into the classloading mechanism of WF instead to > tell it to load the weaver if it isn't already loaded? Can this be done > from within the EAR deployment? Or is there a single point of entry that > WF accesses before scanning any of the classes in the EAR? Or is there a > simpler way of configuring or attaching the AJ Weaver? I did find an old > ticket (https://issues.jboss.org/browse/WFLY-895) that related to this > issue, but it is marked as WONT FIX. > > Am not sure of the best approach at this point. > > > Thanks, > > Eric > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -- Brian Stansberry Manager, Senior Principal Software Engineer Red Hat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171018/b86b3408/attachment.html From ebenzacar at gmail.com Wed Oct 18 22:54:26 2017 From: ebenzacar at gmail.com (Eric B) Date: Wed, 18 Oct 2017 22:54:26 -0400 Subject: [wildfly-dev] Dynamically attaching AspectJ LTW weaver from EAR In-Reply-To: References: Message-ID: This approach seems to work. But injecting/attaching the LTW Agent dynamically requires the com.sun.tools.attach.VirtualMachine (part of the attach API) which is only found in tools.jar. By default Wildfly starts up using the JRE lib in the JAVA_HOME path. What property can I use to add the tools.jar in the startup? I don't want to add tools.jar as a module since it is JVM specific. Is there a parameter I can add to standalone.conf file to include the tools.jar in the classpath and made available to my application? Or is my only option to create a module for it? Thanks, Eric On Wed, Oct 18, 2017 at 3:57 PM, Eric B wrote: > > On Wed, Oct 18, 2017 at 3:37 PM, Stuart Douglas < > stuart.w.douglas at gmail.com> wrote: > >> >> >>> 2) The EJB required is of a singleton pattern. How would that work in a >>> clustered environment? A @Singleton @Startup EJB would only be spawned in >>> a single JVM - other nodes in the cluster won't trigger the @PostConstruct >>> method of it and consquently not load the weaver. >>> >> >> Just don't make it clustered, you want one per JVM not one per cluster. >> > > Am I missing something in my understanding of JEE specs? I thought the > entire principle of the @Singleton was to ensure only a single EJB in the > entire cluster. Hence the Singleton subsystem? As per the docs ( > https://docs.jboss.org/author/display/WFLY10/HA+Singleton+Features): > > In general, an HA or clustered singleton is a service that exists on > multiple nodes in a cluster, but is active on just a single node at any > given time. If the node providing the service fails or is shut down, a new > singleton provider is chosen and started. > > > Is it as simple as setting in the deployment descriptor not to cluster the > @Singleton? ie: in a jboss-ejb3.xml: > > > xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:c="urn:clustering:1.0" > xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee > http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd > http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/ > javaee/ejb-jar_3_1.xsd" > version="3.1" > impl-version="2.0"> > > > AspectJWeaverLoader > false > > > > > > Thanks! > > Eric > > > > > > > >> Stuart >> >>> >>> Is there a way to force eager initialization of a @Stateless bean >>> instead? >>> >>> >>> Baring that, I did run across a blog entry that indicates the use of the >>> Observer pattern listening for the ApplicationScope ( >>> https://rmannibucau.wordpress.com/2015/03/10/cdi-and-startup/). But I >>> suspect that at that point the beans have already been scanned. >>> >>> @ApplicationScoped >>> public class ProvisioningDataForApplicationLifecycle { >>> private final Map users = new HashMap<>(); // + getter >>> >>> public void init(@Observes @Initialized(ApplicationScoped.class) >>> Object init) { >>> users.put("cdi", new User("cdi", "1.1")); >>> users.put("deltaspike", new User("deltaspike", "1.3")); >>> } >>> >>> public void destroy(@Observes @Destroyed(ApplicationScoped.class) >>> Object init) { >>> users.clear(); >>> } >>> } >>> >>> >>> >>> This seems fairly like a complex solution to a fairly simple ask. Or am >>> I misunderstanding the @Singleton pattern? >>> >>> Thanks, >>> >>> Eric >>> >>> >>> On Wed, Oct 18, 2017 at 10:55 AM, Stuart Douglas < >>> stuart.w.douglas at gmail.com> wrote: >>> >>>> So one possibility that comes to mind would be to create a small >>>> deployment that does the aspectJ attach on deploy (e.g. in a @PostConstruct >>>> method of an @Startup EJB). >>>> >>>> You could then add an inter-deployment dependency on this deployment to >>>> all your other deployments, which should ensure that this code is run >>>> before other modules are created/loaded. >>>> >>>> Stuart >>>> >>>> On Wed, Oct 18, 2017 at 4:00 AM, Eric B wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm looking to use AspectJ Load Time Weaving with Wildfly 10. Looking >>>>> around at some posts, it is a little complicated to get Wildfly launched >>>>> properly with the AJ weaver due to the way the AJ library intializes the >>>>> logging subsystem differently than WF. >>>>> >>>>> Digging around, I found a config that actually works. It is >>>>> documented here (obviously some of the class names/versions have to >>>>> change): https://github.com/ChienChingLee/How-to-launch-Wild >>>>> fly-9.0-with-AspectJ-1.8-LTW >>>>> >>>>> But I'm not a fan of changing my conf file to something that has >>>>> hardcoded paths/jar names in it - for example adding: >>>>> -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/or >>>>> g/jboss/logmanager/main/jboss-logmanager-2.0.0.Final.jar >>>>> >>>>> >>>>> Digging around some more in AJ, I saw that as of AJ 1.8.7, there is a >>>>> way to dynamically attach the weaver to the JVM. Very cool. >>>>> https://www.eclipse.org/aspectj/doc/released/README-187.html >>>>> But in order to use the LTW effectively, I need to ensure that the >>>>> weaver is loaded prior to WF scanning and loading any of my classes (EJB, >>>>> annotated beans, pojos, etc). But I have no ideas how to do that. >>>>> >>>>> In the case of a console application, it is pretty straight forward - >>>>> make it the first item in the application's main() method. But in the case >>>>> of a JEE app, I don't know of any main() equivalent. >>>>> >>>>> >>>>> Is there a way to hook into the classloading mechanism of WF instead >>>>> to tell it to load the weaver if it isn't already loaded? Can this be done >>>>> from within the EAR deployment? Or is there a single point of entry that >>>>> WF accesses before scanning any of the classes in the EAR? Or is there a >>>>> simpler way of configuring or attaching the AJ Weaver? I did find an old >>>>> ticket (https://issues.jboss.org/browse/WFLY-895) that related to >>>>> this issue, but it is marked as WONT FIX. >>>>> >>>>> Am not sure of the best approach at this point. >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Eric >>>>> >>>>> _______________________________________________ >>>>> wildfly-dev mailing list >>>>> wildfly-dev at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171018/aa80ad84/attachment-0001.html From tomaz.cerar at gmail.com Fri Oct 20 08:47:08 2017 From: tomaz.cerar at gmail.com (=?UTF-8?B?VG9tYcW+IENlcmFy?=) Date: Fri, 20 Oct 2017 14:47:08 +0200 Subject: [wildfly-dev] Trimming the fat of the build & testsuite Message-ID: Hey guys, As initial work on trimming our IO usage by testsuite and build, I've send https://github.com/wildfly/wildfly-core/pull/2880 which changes wildfly-core to never produce "inflated" build/distro with jars present. But rather uses thin server provisioning (module.xml entries point to maven GAV) As part of this work, "dist" folder is now used for just that, for distribution and noting else. So unless build is invoked with -Drelease which is something that is done as part of release process, "dist" folder will be empty and wont produce anything. Sever for testing is still present in "build" directory as it always was. This was done to reduce unnecessary IO work and producing multiple server builds without need for them. I am sending this mail mostly as FYI that further work on this is going to happen, in core and in full, and such changes might clash with some poeple's workflows, where they are used to expect server dist to be in "dist" folder but it is not there yet. -- tomaz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171020/0241dc4d/attachment.html From smarlow at redhat.com Fri Oct 20 16:43:54 2017 From: smarlow at redhat.com (Scott Marlow) Date: Fri, 20 Oct 2017 16:43:54 -0400 Subject: [wildfly-dev] Trimming the fat of the build & testsuite In-Reply-To: References: Message-ID: Thanks for the heads up, the -Drelease option will be helpful for TCK testing, so thanks also for adding that option! On Fri, Oct 20, 2017 at 8:47 AM, Toma? Cerar wrote: > Hey guys, > > > As initial work on trimming our IO usage by testsuite and build, > I've send https://github.com/wildfly/wildfly-core/pull/2880 > which changes wildfly-core to never produce "inflated" build/distro with > jars present. > But rather uses thin server provisioning (module.xml entries point to maven > GAV) > > As part of this work, "dist" folder is now used for just that, for > distribution and noting else. > So unless build is invoked with -Drelease which is something that is done as > part of release process, "dist" folder will be empty and wont produce > anything. > > Sever for testing is still present in "build" directory as it always was. > > This was done to reduce unnecessary IO work and producing multiple server > builds without need for them. > > I am sending this mail mostly as FYI that further work on this is going to > happen, in core and in full, and such changes might clash with some poeple's > workflows, where they are used to expect server dist to be in "dist" folder > but it is not there yet. > > -- > tomaz > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev From ebenzacar at gmail.com Fri Oct 20 19:29:41 2017 From: ebenzacar at gmail.com (Eric B) Date: Fri, 20 Oct 2017 19:29:41 -0400 Subject: [wildfly-dev] How to put AspectJ aspects on the classpath to advise core classes in Wildfly? Message-ID: I'm trying to use AspectJ to advise some core classes in Wildfly/undertow. Specifically, I'm trying to advise some of the Undertow HttpSession methods to get some more detailed logging when Sessions are created/expire/etc. I've added AspectJ as a -javaagent which is launched on startup of Wildfly. I had to follow some of the steps listed at: https://github.com/ChienChingLee/How-to-launch-Wildfly-9.0-with-AspectJ-1.8-LTW. But it works; I can see that the AJ weaver is loaded and present. My problem now is that I don't know where to put my jar of aspects for it to be loaded/visible by the weaver for all modules. I've managed to get it to work by modifying the io.undertow.servlet module, adding my jar in the folder and modifying the module.xml, but that only advises the io.undertow.servlet.* classes. And it seems like quite an ugly hack to get to that. I tried creating an independent module for it, and declaring it as a global module in my standalone.xml, but that didn't seem to work. Nor did modifying the servlet module.xml and specifying my module as a dependency. I tried to add it to the startup parameters in the standalone.conf file, specifying it as -classpath path/to/myaspect.jar, but that only advised the startup WF (org.jboss) classes and none of the modules. At the moment, I'm looking to advise any implementation of javax.servlet.http.HttpSession.invalidate(). In AJ language, the pointcut is simple: execution(* javax.servlet.http.HttpSession+.invalidate(..)) will match any implementation of the HttpSession interface. However, to make it active, I need to get that Aspect in the classpath of every module loaded and visible to the AJ weaver. Is there a "generic" place I can declare the the aspects.jar so that it is part of the classpath of every module loaded or is my only choice to modify every module.xml in the system? Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171020/1fdda609/attachment.html From stuart.w.douglas at gmail.com Sun Oct 22 19:09:18 2017 From: stuart.w.douglas at gmail.com (Stuart Douglas) Date: Mon, 23 Oct 2017 01:09:18 +0200 Subject: [wildfly-dev] How to put AspectJ aspects on the classpath to advise core classes in Wildfly? In-Reply-To: References: Message-ID: I think you probably want to modify the classpath and also add -Djboss.modules.system.pkgs=org.aspectj (or whatever package aspectj classes are under). This system property is a comma separated list of non-modular packages that JBoss modules will just pass straight through to the system class loader. Stuart On Sat, Oct 21, 2017 at 1:29 AM, Eric B wrote: > I'm trying to use AspectJ to advise some core classes in > Wildfly/undertow. Specifically, I'm trying to advise some of the Undertow > HttpSession methods to get some more detailed logging when Sessions are > created/expire/etc. > > I've added AspectJ as a -javaagent which is launched on startup of > Wildfly. I had to follow some of the steps listed at: https://github.com/ > ChienChingLee/How-to-launch-Wildfly-9.0-with-AspectJ-1.8-LTW. But it > works; I can see that the AJ weaver is loaded and present. > > My problem now is that I don't know where to put my jar of aspects for it > to be loaded/visible by the weaver for all modules. I've managed to get it > to work by modifying the io.undertow.servlet module, adding my jar in the > folder and modifying the module.xml, but that only advises the > io.undertow.servlet.* classes. And it seems like quite an ugly hack to get > to that. > > I tried creating an independent module for it, and declaring it as a > global module in my standalone.xml, but that didn't seem to work. Nor did > modifying the servlet module.xml and specifying my module as a dependency. > > I tried to add it to the startup parameters in the standalone.conf file, > specifying it as -classpath path/to/myaspect.jar, but that only advised the > startup WF (org.jboss) classes and none of the modules. > > At the moment, I'm looking to advise any implementation of > javax.servlet.http.HttpSession.invalidate(). In AJ language, the > pointcut is simple: execution(* javax.servlet.http.HttpSession+.invalidate(..)) > will match any implementation of the HttpSession interface. However, to > make it active, I need to get that Aspect in the classpath of every module > loaded and visible to the AJ weaver. > > Is there a "generic" place I can declare the the aspects.jar so that it is > part of the classpath of every module loaded or is my only choice to modify > every module.xml in the system? > > Thanks, > > Eric > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171023/6852779b/attachment.html From darran.lofthouse at jboss.com Mon Oct 23 04:28:36 2017 From: darran.lofthouse at jboss.com (Darran Lofthouse) Date: Mon, 23 Oct 2017 08:28:36 +0000 Subject: [wildfly-dev] Trimming the fat of the build & testsuite In-Reply-To: References: Message-ID: Does -Drelease just populate the dist folders or does it do anything else as well? On Sat, 21 Oct 2017 at 02:33 Scott Marlow wrote: > Thanks for the heads up, the -Drelease option will be helpful for TCK > testing, so thanks also for adding that option! > > On Fri, Oct 20, 2017 at 8:47 AM, Toma? Cerar > wrote: > > Hey guys, > > > > > > As initial work on trimming our IO usage by testsuite and build, > > I've send https://github.com/wildfly/wildfly-core/pull/2880 > > which changes wildfly-core to never produce "inflated" build/distro with > > jars present. > > But rather uses thin server provisioning (module.xml entries point to > maven > > GAV) > > > > As part of this work, "dist" folder is now used for just that, for > > distribution and noting else. > > So unless build is invoked with -Drelease which is something that is > done as > > part of release process, "dist" folder will be empty and wont produce > > anything. > > > > Sever for testing is still present in "build" directory as it always was. > > > > This was done to reduce unnecessary IO work and producing multiple server > > builds without need for them. > > > > I am sending this mail mostly as FYI that further work on this is going > to > > happen, in core and in full, and such changes might clash with some > poeple's > > workflows, where they are used to expect server dist to be in "dist" > folder > > but it is not there yet. > > > > -- > > tomaz > > > > > > > > _______________________________________________ > > wildfly-dev mailing list > > wildfly-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/wildfly-dev > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171023/77baf762/attachment-0001.html From tomaz.cerar at gmail.com Mon Oct 23 08:21:18 2017 From: tomaz.cerar at gmail.com (=?UTF-8?B?VG9tYcW+IENlcmFy?=) Date: Mon, 23 Oct 2017 14:21:18 +0200 Subject: [wildfly-dev] Trimming the fat of the build & testsuite In-Reply-To: References: Message-ID: > Does -Drelease just populate the dist folders or does it do anything else as well? -Drelease populates dist folder and also produces .zip & tar.gz "distro" of wildfly core. Without this flag, "dist" folder stays completely empty. On Mon, Oct 23, 2017 at 10:28 AM, Darran Lofthouse < darran.lofthouse at jboss.com> wrote: > Does -Drelease just populate the dist folders or does it do anything else > as well? > > > On Sat, 21 Oct 2017 at 02:33 Scott Marlow wrote: > >> Thanks for the heads up, the -Drelease option will be helpful for TCK >> testing, so thanks also for adding that option! >> >> On Fri, Oct 20, 2017 at 8:47 AM, Toma? Cerar >> wrote: >> > Hey guys, >> > >> > >> > As initial work on trimming our IO usage by testsuite and build, >> > I've send https://github.com/wildfly/wildfly-core/pull/2880 >> > which changes wildfly-core to never produce "inflated" build/distro with >> > jars present. >> > But rather uses thin server provisioning (module.xml entries point to >> maven >> > GAV) >> > >> > As part of this work, "dist" folder is now used for just that, for >> > distribution and noting else. >> > So unless build is invoked with -Drelease which is something that is >> done as >> > part of release process, "dist" folder will be empty and wont produce >> > anything. >> > >> > Sever for testing is still present in "build" directory as it always >> was. >> > >> > This was done to reduce unnecessary IO work and producing multiple >> server >> > builds without need for them. >> > >> > I am sending this mail mostly as FYI that further work on this is going >> to >> > happen, in core and in full, and such changes might clash with some >> poeple's >> > workflows, where they are used to expect server dist to be in "dist" >> folder >> > but it is not there yet. >> > >> > -- >> > tomaz >> > >> > >> > >> > _______________________________________________ >> > wildfly-dev mailing list >> > wildfly-dev at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/wildfly-dev >> >> _______________________________________________ >> wildfly-dev mailing list >> wildfly-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/wildfly-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171023/c54c5fd2/attachment.html From ebenzacar at gmail.com Mon Oct 23 11:04:12 2017 From: ebenzacar at gmail.com (Eric B) Date: Mon, 23 Oct 2017 11:04:12 -0400 Subject: [wildfly-dev] How to put AspectJ aspects on the classpath to advise core classes in Wildfly? In-Reply-To: References: Message-ID: Thanks for the tips, but i'm still struggling with this. Here's what I've done so far. I've added the module name under -Djboss.modules.system.pkgs and added it as a cp argument as : -Djboss.modules.system.pkgs=org.jboss.byteman,org.aspectj,org.jboss.logmanager -classpath "D:\jboss-eap-7.0\modules\system\layers\base\org\aspectj\main\aspectj-0.0.1-SNAPSHOT.jar" My org.aspectj module is defined as: Now when I start Wildfly, I still don't see it trying to weave any of the base Wildfly/undertow modules. If I define the org.aspectj as a global module in the standalone.xml, the I see the weaver attempting to weave my application deployment but none of the base WF classes. Does the jboss.modules.system.pkgs argument relate to the module name or to the package naming of the libraries? ie: do my aspects in aspectj-0.0.1-SNAPSHOT.jar also have to be in an 'org.aspectj' java package or am I free to use any package naming structure I want as long as they are part of the org.aspectj WF module definition? My aspect is actually in a test package called "aspectj". I even tried added "aspectj" to the jboss.modules.system.pkgs variable, but to no avail. How does WF know where to find classes/packages defined in 'jboss.modules.system.pkgs'? Thanks, Eric On Sun, Oct 22, 2017 at 7:09 PM, Stuart Douglas wrote: > I think you probably want to modify the classpath and also > add -Djboss.modules.system.pkgs=org.aspectj (or whatever package aspectj > classes are under). This system property is a comma separated list of > non-modular packages that JBoss modules will just pass straight through to > the system class loader. > > Stuart > > On Sat, Oct 21, 2017 at 1:29 AM, Eric B wrote: > >> I'm trying to use AspectJ to advise some core classes in >> Wildfly/undertow. Specifically, I'm trying to advise some of the Undertow >> HttpSession methods to get some more detailed logging when Sessions are >> created/expire/etc. >> >> I've added AspectJ as a -javaagent which is launched on startup of >> Wildfly. I had to follow some of the steps listed at: >> https://github.com/ChienChingLee/How-to-launch-Wildfly- >> 9.0-with-AspectJ-1.8-LTW. But it works; I can see that the AJ weaver is >> loaded and present. >> >> My problem now is that I don't know where to put my jar of aspects for it >> to be loaded/visible by the weaver for all modules. I've managed to get it >> to work by modifying the io.undertow.servlet module, adding my jar in the >> folder and modifying the module.xml, but that only advises the >> io.undertow.servlet.* classes. And it seems like quite an ugly hack to get >> to that. >> >> I tried creating an independent module for it, and declaring it as a >> global module in my standalone.xml, but that didn't seem to work. Nor did >> modifying the servlet module.xml and specifying my module as a dependency. >> >> I tried to add it to the startup parameters in the standalone.conf file, >> specifying it as -classpath path/to/myaspect.jar, but that only advised the >> startup WF (org.jboss) classes and none of the modules. >> >> At the moment, I'm looking to advise any implementation of >> javax.servlet.http.HttpSession.invalidate(). In AJ language, the >> pointcut is simple: execution(* javax.servlet.http.HttpSession+.invalidate(..)) >> will match any implementation of the HttpSession interface. However, to >> make it active, I need to get that Aspect in the classpath of every module >> loaded and visible to the AJ weaver. >> >> Is there a "generic" place I can declare the the aspects.jar so that it >> is part of the classpath of every module loaded or is my only choice to >> modify every module.xml in the system? >> >> Thanks, >> >> Eric >> >> >> _______________________________________________ >> wildfly-dev mailing list >> wildfly-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/wildfly-dev >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171023/92975577/attachment.html From stuart.w.douglas at gmail.com Mon Oct 23 15:07:26 2017 From: stuart.w.douglas at gmail.com (Stuart Douglas) Date: Tue, 24 Oct 2017 06:07:26 +1100 Subject: [wildfly-dev] How to put AspectJ aspects on the classpath to advise core classes in Wildfly? In-Reply-To: References: Message-ID: On Tue, Oct 24, 2017 at 2:04 AM, Eric B wrote: > Thanks for the tips, but i'm still struggling with this. Here's what I've > done so far. > > I've added the module name under -Djboss.modules.system.pkgs and added it > as a cp argument as : > This is not a module name, but a package name. You should not be creating a aspectj modules. Stuart > > -Djboss.modules.system.pkgs=org.jboss.byteman,org.aspectj, > org.jboss.logmanager > -classpath "D:\jboss-eap-7.0\modules\system\layers\base\org\ > aspectj\main\aspectj-0.0.1-SNAPSHOT.jar" > > My org.aspectj module is defined as: > > > > > > > > > > > Now when I start Wildfly, I still don't see it trying to weave any of the > base Wildfly/undertow modules. If I define the org.aspectj as a global > module in the standalone.xml, the I see the weaver attempting to weave my > application deployment but none of the base WF classes. > > Does the jboss.modules.system.pkgs argument relate to the module name or > to the package naming of the libraries? ie: do my aspects in > aspectj-0.0.1-SNAPSHOT.jar also have to be in an 'org.aspectj' java > package or am I free to use any package naming structure I want as long as > they are part of the org.aspectj WF module definition? My aspect is > actually in a test package called "aspectj". I even tried added "aspectj" > to the jboss.modules.system.pkgs variable, but to no avail. > > How does WF know where to find classes/packages defined in > 'jboss.modules.system.pkgs'? > > Thanks, > > Eric > > > > > On Sun, Oct 22, 2017 at 7:09 PM, Stuart Douglas < > stuart.w.douglas at gmail.com> wrote: > >> I think you probably want to modify the classpath and also >> add -Djboss.modules.system.pkgs=org.aspectj (or whatever package aspectj >> classes are under). This system property is a comma separated list of >> non-modular packages that JBoss modules will just pass straight through to >> the system class loader. >> >> Stuart >> >> On Sat, Oct 21, 2017 at 1:29 AM, Eric B wrote: >> >>> I'm trying to use AspectJ to advise some core classes in >>> Wildfly/undertow. Specifically, I'm trying to advise some of the Undertow >>> HttpSession methods to get some more detailed logging when Sessions are >>> created/expire/etc. >>> >>> I've added AspectJ as a -javaagent which is launched on startup of >>> Wildfly. I had to follow some of the steps listed at: >>> https://github.com/ChienChingLee/How-to-launch-Wildfly-9 >>> .0-with-AspectJ-1.8-LTW. But it works; I can see that the AJ weaver is >>> loaded and present. >>> >>> My problem now is that I don't know where to put my jar of aspects for >>> it to be loaded/visible by the weaver for all modules. I've managed to get >>> it to work by modifying the io.undertow.servlet module, adding my jar in >>> the folder and modifying the module.xml, but that only advises the >>> io.undertow.servlet.* classes. And it seems like quite an ugly hack to get >>> to that. >>> >>> I tried creating an independent module for it, and declaring it as a >>> global module in my standalone.xml, but that didn't seem to work. Nor did >>> modifying the servlet module.xml and specifying my module as a dependency. >>> >>> I tried to add it to the startup parameters in the standalone.conf file, >>> specifying it as -classpath path/to/myaspect.jar, but that only advised the >>> startup WF (org.jboss) classes and none of the modules. >>> >>> At the moment, I'm looking to advise any implementation of >>> javax.servlet.http.HttpSession.invalidate(). In AJ language, the >>> pointcut is simple: execution(* javax.servlet.http.HttpSession+.invalidate(..)) >>> will match any implementation of the HttpSession interface. However, to >>> make it active, I need to get that Aspect in the classpath of every module >>> loaded and visible to the AJ weaver. >>> >>> Is there a "generic" place I can declare the the aspects.jar so that it >>> is part of the classpath of every module loaded or is my only choice to >>> modify every module.xml in the system? >>> >>> Thanks, >>> >>> Eric >>> >>> >>> _______________________________________________ >>> wildfly-dev mailing list >>> wildfly-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171024/cf2f96d2/attachment-0001.html From ebenzacar at gmail.com Mon Oct 23 17:59:35 2017 From: ebenzacar at gmail.com (Eric B) Date: Mon, 23 Oct 2017 17:59:35 -0400 Subject: [wildfly-dev] How to put AspectJ aspects on the classpath to advise core classes in Wildfly? In-Reply-To: References: Message-ID: Where does WF know where to find the corresponding jar that contains that package name? Does it take it from the jvm startup classpath parameters? Does it matter if it's -cp or -Xbootclasspath/a? Thanks Eric On Oct 23, 2017 3:07 PM, "Stuart Douglas" wrote: > > > On Tue, Oct 24, 2017 at 2:04 AM, Eric B wrote: > >> Thanks for the tips, but i'm still struggling with this. Here's what >> I've done so far. >> >> I've added the module name under -Djboss.modules.system.pkgs and added it >> as a cp argument as : >> > > This is not a module name, but a package name. You should not be creating > a aspectj modules. > > Stuart > > >> >> -Djboss.modules.system.pkgs=org.jboss.byteman,org.aspectj, >> org.jboss.logmanager >> -classpath "D:\jboss-eap-7.0\modules\system\layers\base\org\aspectj\ >> main\aspectj-0.0.1-SNAPSHOT.jar" >> >> My org.aspectj module is defined as: >> >> >> >> >> >> >> >> >> >> >> Now when I start Wildfly, I still don't see it trying to weave any of the >> base Wildfly/undertow modules. If I define the org.aspectj as a global >> module in the standalone.xml, the I see the weaver attempting to weave my >> application deployment but none of the base WF classes. >> >> Does the jboss.modules.system.pkgs argument relate to the module name or >> to the package naming of the libraries? ie: do my aspects in >> aspectj-0.0.1-SNAPSHOT.jar also have to be in an 'org.aspectj' java >> package or am I free to use any package naming structure I want as long as >> they are part of the org.aspectj WF module definition? My aspect is >> actually in a test package called "aspectj". I even tried added "aspectj" >> to the jboss.modules.system.pkgs variable, but to no avail. >> >> How does WF know where to find classes/packages defined in >> 'jboss.modules.system.pkgs'? >> >> Thanks, >> >> Eric >> >> >> >> >> On Sun, Oct 22, 2017 at 7:09 PM, Stuart Douglas < >> stuart.w.douglas at gmail.com> wrote: >> >>> I think you probably want to modify the classpath and also >>> add -Djboss.modules.system.pkgs=org.aspectj (or whatever package >>> aspectj classes are under). This system property is a comma separated list >>> of non-modular packages that JBoss modules will just pass straight through >>> to the system class loader. >>> >>> Stuart >>> >>> On Sat, Oct 21, 2017 at 1:29 AM, Eric B wrote: >>> >>>> I'm trying to use AspectJ to advise some core classes in >>>> Wildfly/undertow. Specifically, I'm trying to advise some of the Undertow >>>> HttpSession methods to get some more detailed logging when Sessions are >>>> created/expire/etc. >>>> >>>> I've added AspectJ as a -javaagent which is launched on startup of >>>> Wildfly. I had to follow some of the steps listed at: >>>> https://github.com/ChienChingLee/How-to-launch-Wildfly-9 >>>> .0-with-AspectJ-1.8-LTW. But it works; I can see that the AJ weaver >>>> is loaded and present. >>>> >>>> My problem now is that I don't know where to put my jar of aspects for >>>> it to be loaded/visible by the weaver for all modules. I've managed to get >>>> it to work by modifying the io.undertow.servlet module, adding my jar in >>>> the folder and modifying the module.xml, but that only advises the >>>> io.undertow.servlet.* classes. And it seems like quite an ugly hack to get >>>> to that. >>>> >>>> I tried creating an independent module for it, and declaring it as a >>>> global module in my standalone.xml, but that didn't seem to work. Nor did >>>> modifying the servlet module.xml and specifying my module as a dependency. >>>> >>>> I tried to add it to the startup parameters in the standalone.conf >>>> file, specifying it as -classpath path/to/myaspect.jar, but that only >>>> advised the startup WF (org.jboss) classes and none of the modules. >>>> >>>> At the moment, I'm looking to advise any implementation of >>>> javax.servlet.http.HttpSession.invalidate(). In AJ language, the >>>> pointcut is simple: execution(* javax.servlet.http.HttpSession+.invalidate(..)) >>>> will match any implementation of the HttpSession interface. However, to >>>> make it active, I need to get that Aspect in the classpath of every module >>>> loaded and visible to the AJ weaver. >>>> >>>> Is there a "generic" place I can declare the the aspects.jar so that it >>>> is part of the classpath of every module loaded or is my only choice to >>>> modify every module.xml in the system? >>>> >>>> Thanks, >>>> >>>> Eric >>>> >>>> >>>> _______________________________________________ >>>> wildfly-dev mailing list >>>> wildfly-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171023/b726b51c/attachment.html From sanne at hibernate.org Tue Oct 24 04:34:32 2017 From: sanne at hibernate.org (Sanne Grinovero) Date: Tue, 24 Oct 2017 09:34:32 +0100 Subject: [wildfly-dev] Trimming the fat of the build & testsuite In-Reply-To: References: Message-ID: Was it worth it? On 23 Oct 2017 15:01, "Toma? Cerar" wrote: > > Does -Drelease just populate the dist folders or does it do anything > else as well? > > -Drelease populates dist folder and also produces .zip & tar.gz "distro" > of wildfly core. > > Without this flag, "dist" folder stays completely empty. > > On Mon, Oct 23, 2017 at 10:28 AM, Darran Lofthouse < > darran.lofthouse at jboss.com> wrote: > >> Does -Drelease just populate the dist folders or does it do anything else >> as well? >> >> >> On Sat, 21 Oct 2017 at 02:33 Scott Marlow wrote: >> >>> Thanks for the heads up, the -Drelease option will be helpful for TCK >>> testing, so thanks also for adding that option! >>> >>> On Fri, Oct 20, 2017 at 8:47 AM, Toma? Cerar >>> wrote: >>> > Hey guys, >>> > >>> > >>> > As initial work on trimming our IO usage by testsuite and build, >>> > I've send https://github.com/wildfly/wildfly-core/pull/2880 >>> > which changes wildfly-core to never produce "inflated" build/distro >>> with >>> > jars present. >>> > But rather uses thin server provisioning (module.xml entries point to >>> maven >>> > GAV) >>> > >>> > As part of this work, "dist" folder is now used for just that, for >>> > distribution and noting else. >>> > So unless build is invoked with -Drelease which is something that is >>> done as >>> > part of release process, "dist" folder will be empty and wont produce >>> > anything. >>> > >>> > Sever for testing is still present in "build" directory as it always >>> was. >>> > >>> > This was done to reduce unnecessary IO work and producing multiple >>> server >>> > builds without need for them. >>> > >>> > I am sending this mail mostly as FYI that further work on this is >>> going to >>> > happen, in core and in full, and such changes might clash with some >>> poeple's >>> > workflows, where they are used to expect server dist to be in "dist" >>> folder >>> > but it is not there yet. >>> > >>> > -- >>> > tomaz >>> > >>> > >>> > >>> > _______________________________________________ >>> > wildfly-dev mailing list >>> > wildfly-dev at lists.jboss.org >>> > https://lists.jboss.org/mailman/listinfo/wildfly-dev >>> >>> _______________________________________________ >>> wildfly-dev mailing list >>> wildfly-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >> >> > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171024/a50853e5/attachment.html From stuart.w.douglas at gmail.com Tue Oct 24 14:31:39 2017 From: stuart.w.douglas at gmail.com (Stuart Douglas) Date: Wed, 25 Oct 2017 05:31:39 +1100 Subject: [wildfly-dev] How to put AspectJ aspects on the classpath to advise core classes in Wildfly? In-Reply-To: References: Message-ID: Basically if the package name matches it just delegates to the system class loader, so if it is on the classpath or boot classpath it should be found. Stuart On Tue, Oct 24, 2017 at 8:59 AM, Eric B wrote: > Where does WF know where to find the corresponding jar that contains that > package name? Does it take it from the jvm startup classpath parameters? > Does it matter if it's -cp or -Xbootclasspath/a? > > Thanks > > Eric > > On Oct 23, 2017 3:07 PM, "Stuart Douglas" > wrote: > >> >> >> On Tue, Oct 24, 2017 at 2:04 AM, Eric B wrote: >> >>> Thanks for the tips, but i'm still struggling with this. Here's what >>> I've done so far. >>> >>> I've added the module name under -Djboss.modules.system.pkgs and added >>> it as a cp argument as : >>> >> >> This is not a module name, but a package name. You should not be creating >> a aspectj modules. >> >> Stuart >> >> >>> >>> -Djboss.modules.system.pkgs=org.jboss.byteman,org.aspectj, >>> org.jboss.logmanager >>> -classpath "D:\jboss-eap-7.0\modules\syst >>> em\layers\base\org\aspectj\main\aspectj-0.0.1-SNAPSHOT.jar" >>> >>> My org.aspectj module is defined as: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Now when I start Wildfly, I still don't see it trying to weave any of >>> the base Wildfly/undertow modules. If I define the org.aspectj as a >>> global module in the standalone.xml, the I see the weaver attempting to >>> weave my application deployment but none of the base WF classes. >>> >>> Does the jboss.modules.system.pkgs argument relate to the module name or >>> to the package naming of the libraries? ie: do my aspects in >>> aspectj-0.0.1-SNAPSHOT.jar also have to be in an 'org.aspectj' java >>> package or am I free to use any package naming structure I want as long as >>> they are part of the org.aspectj WF module definition? My aspect is >>> actually in a test package called "aspectj". I even tried added "aspectj" >>> to the jboss.modules.system.pkgs variable, but to no avail. >>> >>> How does WF know where to find classes/packages defined in >>> 'jboss.modules.system.pkgs'? >>> >>> Thanks, >>> >>> Eric >>> >>> >>> >>> >>> On Sun, Oct 22, 2017 at 7:09 PM, Stuart Douglas < >>> stuart.w.douglas at gmail.com> wrote: >>> >>>> I think you probably want to modify the classpath and also >>>> add -Djboss.modules.system.pkgs=org.aspectj (or whatever package >>>> aspectj classes are under). This system property is a comma separated list >>>> of non-modular packages that JBoss modules will just pass straight through >>>> to the system class loader. >>>> >>>> Stuart >>>> >>>> On Sat, Oct 21, 2017 at 1:29 AM, Eric B wrote: >>>> >>>>> I'm trying to use AspectJ to advise some core classes in >>>>> Wildfly/undertow. Specifically, I'm trying to advise some of the Undertow >>>>> HttpSession methods to get some more detailed logging when Sessions are >>>>> created/expire/etc. >>>>> >>>>> I've added AspectJ as a -javaagent which is launched on startup of >>>>> Wildfly. I had to follow some of the steps listed at: >>>>> https://github.com/ChienChingLee/How-to-launch-Wildfly-9 >>>>> .0-with-AspectJ-1.8-LTW. But it works; I can see that the AJ weaver >>>>> is loaded and present. >>>>> >>>>> My problem now is that I don't know where to put my jar of aspects for >>>>> it to be loaded/visible by the weaver for all modules. I've managed to get >>>>> it to work by modifying the io.undertow.servlet module, adding my jar in >>>>> the folder and modifying the module.xml, but that only advises the >>>>> io.undertow.servlet.* classes. And it seems like quite an ugly hack to get >>>>> to that. >>>>> >>>>> I tried creating an independent module for it, and declaring it as a >>>>> global module in my standalone.xml, but that didn't seem to work. Nor did >>>>> modifying the servlet module.xml and specifying my module as a dependency. >>>>> >>>>> I tried to add it to the startup parameters in the standalone.conf >>>>> file, specifying it as -classpath path/to/myaspect.jar, but that only >>>>> advised the startup WF (org.jboss) classes and none of the modules. >>>>> >>>>> At the moment, I'm looking to advise any implementation of >>>>> javax.servlet.http.HttpSession.invalidate(). In AJ language, the >>>>> pointcut is simple: execution(* javax.servlet.http.HttpSession+.invalidate(..)) >>>>> will match any implementation of the HttpSession interface. However, to >>>>> make it active, I need to get that Aspect in the classpath of every module >>>>> loaded and visible to the AJ weaver. >>>>> >>>>> Is there a "generic" place I can declare the the aspects.jar so that >>>>> it is part of the classpath of every module loaded or is my only choice to >>>>> modify every module.xml in the system? >>>>> >>>>> Thanks, >>>>> >>>>> Eric >>>>> >>>>> >>>>> _______________________________________________ >>>>> wildfly-dev mailing list >>>>> wildfly-dev at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>>> >>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171025/1f784db1/attachment-0001.html From brian.stansberry at redhat.com Wed Oct 25 14:16:59 2017 From: brian.stansberry at redhat.com (Brian Stansberry) Date: Wed, 25 Oct 2017 13:16:59 -0500 Subject: [wildfly-dev] Trimming the fat of the build & testsuite In-Reply-To: References: Message-ID: AFAICT currently (i.e. before this change), the normal dist module build (i.e. no -Drelease) didn't do anything different from the 'build' module besides creating a fat server, except [1]. So I'm ok with skipping that. I'll just change my normal $ dist/target/wildfly-whatever-SNAPSHOT/bin/standalone.sh to $ build/target/wildfly-whatever-SNAPSHOT/bin/standalone.sh [1] In full WildFly the dist module runs the maven-verifier-plugin. We'll need to move that to 'build' as I don't want it only run when we're about to release. I believe all the existing verifications should work just fine from build, except for this one, which IMO should be removed anyway, as it's not checking any contract we support: target/${server.output.dir.prefix}-${project.version}/modules/system/layers/base/org/jboss/as/server/main/wildfly-server-${version.org.wildfly.core}.jar true Rob -- can you confirm that JBDS doesn't really need to check the contents of the server module any more? AIUI doing that was just a workaround in some prior releases and isn't relevant with the latest releases. On Fri, Oct 20, 2017 at 7:47 AM, Toma? Cerar wrote: > Hey guys, > > > As initial work on trimming our IO usage by testsuite and build, > I've send https://github.com/wildfly/wildfly-core/pull/2880 > which changes wildfly-core to never produce "inflated" build/distro with > jars present. > But rather uses thin server provisioning (module.xml entries point to > maven GAV) > > As part of this work, "dist" folder is now used for just that, for > distribution and noting else. > So unless build is invoked with -Drelease which is something that is done > as part of release process, "dist" folder will be empty and wont produce > anything. > > Sever for testing is still present in "build" directory as it always was. > > This was done to reduce unnecessary IO work and producing multiple server > builds without need for them. > > I am sending this mail mostly as FYI that further work on this is going to > happen, in core and in full, and such changes might clash with some > poeple's workflows, where they are used to expect server dist to be in > "dist" folder but it is not there yet. > > -- > tomaz > > > > _______________________________________________ > wildfly-dev mailing list > wildfly-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/wildfly-dev > -- Brian Stansberry Manager, Senior Principal Software Engineer Red Hat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171025/1fbd0423/attachment.html From ebenzacar at gmail.com Thu Oct 26 14:33:39 2017 From: ebenzacar at gmail.com (Eric B) Date: Thu, 26 Oct 2017 14:33:39 -0400 Subject: [wildfly-dev] How to put AspectJ aspects on the classpath to advise core classes in Wildfly? In-Reply-To: References: Message-ID: I've been trying that, but something is still not working right. The individual module classloaders are not seeing the class as defined by my startup string. I'm staring WF using the following arguments: -Djboss.modules.system.pkgs=org.jboss.byteman,org.aspectj, test.aspectj,org.jboss.logmanager -javaagent:c:/dev/tmp/jboss-eap-7.0.0/modules/system/ layers/base/org/aspectj/main/aspectjweaver-1.8.10.jar -Dorg.aspectj.weaver.showWeaveInfo=true" -Dorg.aspectj.weaver.loadtime.configuration=file:c:/tmp/poc/aop.xml -cp C:/dev/Projects/jms/mixed-arch/ear-app/aspectj/target/ aspectj-0.0.1-SNAPSHOT.jar But I get the following errors thrown my the AspectJ Weaver: 2017-10-26 12:11:39,889 ERROR [stderr] (MSC service thread 1-7) [ModuleClassLoader at 336f62a1] info register aspect test.aspectj.TestAspect 2017-10-26 12:11:54,632 ERROR [stderr] (MSC service thread 1-7) [ModuleClassLoader at 336f62a1] error The specified aspect 'test.aspectj.TestAspect' cannot be found I've confirmed that my class (test.aspectj.TestAspect) is indeed in the aspectj-0.0.1-SNAPSHOT.jar. So I get the impression that the aspectj-SNAPSHOT jar is not being made visible to the individual module classloaders. I've tried to debug the weaver, and can see that it does indeed do the following: private URL toURL(String className) { URL url = (URL) nameMap.get(className); if (url == null) { String classFile = className.replace('.', '/'); url = loaderRef.getClassLoader().getResource(classFile + ".class"); nameMap.put(className, url); } return url; } where the loaderRef.getClassLoader() looks like it is the classloader that is passed to the ClassFileTransformer.transform() method ( https://docs.oracle.com/javase/7/docs/api/java/lang/instrument/ ClassFileTransformer.html). I'm not sure where/how to go from here. Am I not passing the arguments correctly? is the -cp not included in the classloader that is used by the -javaagent/Instrumention? Where is the -Djboss.modules.system.pkgs used? Thanks, Eric On Tue, Oct 24, 2017 at 2:31 PM, Stuart Douglas wrote: > Basically if the package name matches it just delegates to the system > class loader, so if it is on the classpath or boot classpath it should be > found. > > Stuart > > On Tue, Oct 24, 2017 at 8:59 AM, Eric B wrote: > >> Where does WF know where to find the corresponding jar that contains that >> package name? Does it take it from the jvm startup classpath parameters? >> Does it matter if it's -cp or -Xbootclasspath/a? >> >> Thanks >> >> Eric >> >> On Oct 23, 2017 3:07 PM, "Stuart Douglas" >> wrote: >> >>> >>> >>> On Tue, Oct 24, 2017 at 2:04 AM, Eric B wrote: >>> >>>> Thanks for the tips, but i'm still struggling with this. Here's what >>>> I've done so far. >>>> >>>> I've added the module name under -Djboss.modules.system.pkgs and added >>>> it as a cp argument as : >>>> >>> >>> This is not a module name, but a package name. You should not be >>> creating a aspectj modules. >>> >>> Stuart >>> >>> >>>> >>>> -Djboss.modules.system.pkgs=org.jboss.byteman,org.aspectj, >>>> org.jboss.logmanager >>>> -classpath "D:\jboss-eap-7.0\modules\syst >>>> em\layers\base\org\aspectj\main\aspectj-0.0.1-SNAPSHOT.jar" >>>> >>>> My org.aspectj module is defined as: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Now when I start Wildfly, I still don't see it trying to weave any of >>>> the base Wildfly/undertow modules. If I define the org.aspectj as a >>>> global module in the standalone.xml, the I see the weaver attempting to >>>> weave my application deployment but none of the base WF classes. >>>> >>>> Does the jboss.modules.system.pkgs argument relate to the module name >>>> or to the package naming of the libraries? ie: do my aspects in >>>> aspectj-0.0.1-SNAPSHOT.jar also have to be in an 'org.aspectj' java >>>> package or am I free to use any package naming structure I want as long as >>>> they are part of the org.aspectj WF module definition? My aspect is >>>> actually in a test package called "aspectj". I even tried added "aspectj" >>>> to the jboss.modules.system.pkgs variable, but to no avail. >>>> >>>> How does WF know where to find classes/packages defined in >>>> 'jboss.modules.system.pkgs'? >>>> >>>> Thanks, >>>> >>>> Eric >>>> >>>> >>>> >>>> >>>> On Sun, Oct 22, 2017 at 7:09 PM, Stuart Douglas < >>>> stuart.w.douglas at gmail.com> wrote: >>>> >>>>> I think you probably want to modify the classpath and also >>>>> add -Djboss.modules.system.pkgs=org.aspectj (or whatever package >>>>> aspectj classes are under). This system property is a comma separated list >>>>> of non-modular packages that JBoss modules will just pass straight through >>>>> to the system class loader. >>>>> >>>>> Stuart >>>>> >>>>> On Sat, Oct 21, 2017 at 1:29 AM, Eric B wrote: >>>>> >>>>>> I'm trying to use AspectJ to advise some core classes in >>>>>> Wildfly/undertow. Specifically, I'm trying to advise some of the Undertow >>>>>> HttpSession methods to get some more detailed logging when Sessions are >>>>>> created/expire/etc. >>>>>> >>>>>> I've added AspectJ as a -javaagent which is launched on startup of >>>>>> Wildfly. I had to follow some of the steps listed at: >>>>>> https://github.com/ChienChingLee/How-to-launch-Wildfly-9 >>>>>> .0-with-AspectJ-1.8-LTW. But it works; I can see that the AJ weaver >>>>>> is loaded and present. >>>>>> >>>>>> My problem now is that I don't know where to put my jar of aspects >>>>>> for it to be loaded/visible by the weaver for all modules. I've managed to >>>>>> get it to work by modifying the io.undertow.servlet module, adding my jar >>>>>> in the folder and modifying the module.xml, but that only advises the >>>>>> io.undertow.servlet.* classes. And it seems like quite an ugly hack to get >>>>>> to that. >>>>>> >>>>>> I tried creating an independent module for it, and declaring it as a >>>>>> global module in my standalone.xml, but that didn't seem to work. Nor did >>>>>> modifying the servlet module.xml and specifying my module as a dependency. >>>>>> >>>>>> I tried to add it to the startup parameters in the standalone.conf >>>>>> file, specifying it as -classpath path/to/myaspect.jar, but that only >>>>>> advised the startup WF (org.jboss) classes and none of the modules. >>>>>> >>>>>> At the moment, I'm looking to advise any implementation of >>>>>> javax.servlet.http.HttpSession.invalidate(). In AJ language, the >>>>>> pointcut is simple: execution(* javax.servlet.http.HttpSession+.invalidate(..)) >>>>>> will match any implementation of the HttpSession interface. However, to >>>>>> make it active, I need to get that Aspect in the classpath of every module >>>>>> loaded and visible to the AJ weaver. >>>>>> >>>>>> Is there a "generic" place I can declare the the aspects.jar so that >>>>>> it is part of the classpath of every module loaded or is my only choice to >>>>>> modify every module.xml in the system? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Eric >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> wildfly-dev mailing list >>>>>> wildfly-dev at lists.jboss.org >>>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev >>>>>> >>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171026/33cf6319/attachment-0001.html From rory.odonnell at oracle.com Fri Oct 27 04:54:11 2017 From: rory.odonnell at oracle.com (Rory O'Donnell) Date: Fri, 27 Oct 2017 09:54:11 +0100 Subject: [wildfly-dev] JDK 8u162 b01 Early Access is available on jdk.java.net Message-ID: <5220d12c-229b-5c47-9884-ecedda1e48ac@oracle.com> Hi Jason/Tomaz, *JDK 8u162 Early Access*? build 01 is available at : - jdk.java.net/8/ Information and schedules specific to OpenJDK 8u162 release are listed here *JRE and JDK Cryptographic Roadmap* has been updated the details are here ** *JavaOne2017* took place October 1 to 5, 2017 at San Francisco. If you were unable to attend the event or missed some talks, below you will find links to keynotes from last week that have been posted for on-demand replay: * JavaOne Opening Keynote (Monday, Oct. 2): o https://www.oracle.com/javaone/on-demand.html?bcid=5596229112001 * Oracle Code Keynote (Tuesday, Oct. 3): o https://www.oracle.com/javaone/on-demand.html?bcid=5600354378001 * JavaOne Community Keynote (Thursday, Oct. 5): o https://www.oracle.com/javaone/on-demand.html?bcid=5604479599001 Regards, Rory -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171027/abee72eb/attachment.html