[wildfly-dev] JBoss Modules canonical sample

Arun Gupta arun.gupta at gmail.com
Tue Feb 18 15:29:19 EST 2014


On Tue, Feb 18, 2014 at 2:05 AM, Tomaž Cerar <tomaz.cerar at gmail.com> wrote:
> What do you mean resolution of service?
> you have some service registered via ServiceLoader pattern?
Yes, the API, Impl, and and application module are defined at:

https://github.com/arun-gupta/wildfly-samples/tree/master/jboss-modules

>
> in that case you need to import also services when you are "importing"
> module to your application.
OK, I'm missing this step.

How can this be done ?

>
> as for logging goes, you can set org.jboss.modules to TRACE
I enabled TRACE logging but saw no additional log entries. Here is how
I enabled it:

/subsystem=logging/logger=org.jboss.modules:add
/subsystem=logging/logger=org.jboss.modules:write-attribute(name="level",
value="TRACE")

Arun

>
> --
> tomaz
>
>
> On Tue, Feb 18, 2014 at 6:28 AM, Arun Gupta <arun.gupta at gmail.com> wrote:
>>
>> Seems like the sample has more issues as just adding "main" directory
>> did not enable resolution of service.
>>
>> How would we typically debug this scenario ? What kind of loggers to
>> be turned on ?
>>
>> Arun
>>
>> On Mon, Feb 17, 2014 at 7:23 PM, Brian Stansberry
>> <brian.stansberry at redhat.com> wrote:
>> > In your directory structure, you need "main" after "greet".
>> >
>> > modules/org/samples/greet/main
>> >
>> > A module id is composed of a name and a slot, with "main" as the default
>> > slot. The directory structure must include the slot.
>> >
>> > On 2/17/14, 9:06 PM, Arun Gupta wrote:
>> >> I'm trying to create a simple sample that shows JBoss Modules and
>> >> source code is checked in at:
>> >>
>> >> https://github.com/arun-gupta/wildfly-samples/tree/master/jboss-modules
>> >>
>> >> Also created the following directories in "modules":
>> >>
>> >> modules/org
>> >> modules/org/samples
>> >> modules/org/samples/greet
>> >> modules/org/samples/greet/greet-api-1.0-SNAPSHOT.jar
>> >> modules/org/samples/greet/greet-simple-1.0-SNAPSHOT.jar
>> >> modules/org/samples/greet/modules.xml
>> >>
>> >> modules.xml looks like:
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <module xmlns="urn:jboss:module:1.0" name="org.samples.greet">
>> >>      <resources>
>> >>          <resource-root path="greet-api-1.0.0-SNAPSHOT.jar" />
>> >>          <resource-root path="greet-simple-1.0.0-SNAPSHOT.jar" />
>> >>      </resources>
>> >> </module>
>> >>
>> >> The web application accesses a service from API module but no results
>> >> are returned. No error logs, no service not resolved error, nothing.
>> >>
>> >> Seems like I'm doing something incorrectly basic. Suggestions how to
>> >> debug this further ?
>> >>
>> >> Thanks,
>> >> Arun
>> >>
>> >
>> >
>> > --
>> > Brian Stansberry
>> > Senior Principal Software Engineer
>> > JBoss by Red Hat
>> > _______________________________________________
>> > wildfly-dev mailing list
>> > wildfly-dev at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>>
>>
>> --
>> http://blog.arungupta.me
>> http://twitter.com/arungupta
>> _______________________________________________
>> wildfly-dev mailing list
>> wildfly-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>



-- 
http://blog.arungupta.me
http://twitter.com/arungupta



More information about the wildfly-dev mailing list