MicroProfile Starter available for testing

157 views
Skip to first unread message

Rudy De Busscher

unread,
Jul 11, 2018, 3:01:01 PM7/11/18
to Eclipse MicroProfile
All,

As discussed earlier, I have created a special version of Jessie called MicroProfile Starter (based on the consensus of the name) which generates a starter application for MicroProfile based implementations.

You can test it here (1)

Any issues or comments, let me know and I'll take a look at it.

Let me know if I need to do something if this needs to be integrated into http://start.microprofile.io site (see https://github.com/microprofile/microprofile-site/issues/27)

regards
Rudy

Daniel Dias Dos Santos

unread,
Jul 11, 2018, 3:36:47 PM7/11/18
to microp...@googlegroups.com
It was very good.

I think it's a good idea to have a generator on the MicroProfile website.
--
Daniel Dias dos Santos
Java Developer
SouJava & JCP Member
Linkedin: http://br.linkedin.com/in/danieldiassantos


--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/0f4574b2-8de4-4f2d-a3ce-efd1c62f9a73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Guillermo González de Agüero

unread,
Jul 11, 2018, 3:42:13 PM7/11/18
to microp...@googlegroups.com
Great job Rudy, thanks for bringing this! 

PS: nice JSF demo ;)

--

Emily Jiang

unread,
Jul 11, 2018, 5:41:46 PM7/11/18
to Eclipse MicroProfile
Awesome! I tried the new version again. Thanks for your great effort to sync up with MicroProfile releases! Soon the list will need to have MP 1.4 and MP 2.0.1.

By the way, I spotted a couple of issues:
1. RestApplication - class name RestApplication prefixed with artifact Id. This gives me problem if the artifact id contains ".". I suggest the JAX-RS application is called RestApplication instead, without being prefixed.

2. The class FaultToleranceController has no cdi scope. It will not work as the bean-discovery-mode is annotated.

I suggest to create an empty beans.xml instead of the current beans.xml with the bean-discovery-mode as "annotated"


I think we should store your source code in Eclipse microprofile github (e.g. microprofile-starter). Thoughts?
Based on the previous conversation, we are very keen to start the new page start.microprofie.io. Just tell us when you feel ready. I think David Blevins or someone from Tomitribe will be able to help.

Thanks
Emily

Rudy De Busscher

unread,
Jul 12, 2018, 3:35:58 AM7/12/18
to microp...@googlegroups.com
 Soon the list will need to have MP 1.4 and MP 2.0.1.
At the time there are implementations available, I'll add them to app.

Thanks for the issues

This gives me problem if the artifact id contains "."
I have filtered out the dots.


FaultToleranceController has no cdi scope.
This seems a specification ambiguity. (I have opened an issue https://github.com/eclipse/microprofile-fault-tolerance/issues/296)

Other implementations don't require that the JAX-RS controllers to be CDI beans to be able to add the resilient interceptors.

I have added @ApplicationScoped, since it needs to work in all situations, also the case where people use bean-discovery-mode "annotated" (which is the best practice for a lot of companies because they don't want the majority of POJOs as CDI beans.)

Deployment

We have to look for a place to deploy the app. I have issues of keeping it running and updated at my OpenShift Free account as I don't have enough resources.

Regards
Rudy

You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/kKsrLKLPEN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.

To post to this group, send email to microp...@googlegroups.com.

Heiko Rupp

unread,
Jul 12, 2018, 6:10:29 AM7/12/18
to Eclipse MicroProfile
Great job. What do you need to include Thorntail v2 in the server list?

Rudy De Busscher

unread,
Jul 12, 2018, 11:02:17 AM7/12/18
to microp...@googlegroups.com
I can just take a copy from wildfly-swarm and change a few groupId to io.thorntail I guess.

I'll give it a try and let you know if I have any issues.

Thanks
Rudy


--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/kKsrLKLPEN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.

Heiko Rupp

unread,
Jul 13, 2018, 7:02:33 AM7/13/18
to Eclipse MicroProfile


Am Donnerstag, 12. Juli 2018 17:02:17 UTC+2 schrieb Rudy De Busscher:
I can just take a copy from wildfly-swarm and change a few groupId to io.thorntail I guess.

I'll give it a try and let you know if I have any issues.

TT v2.0.0 has some smaller issues with the bom for MP related things. Have a look at https://gitlab.com/pilhuhn/jfs2018/blob/master/services/pom.xml#L53-L82

 Thanks
     Heiko
 

Rudy De Busscher

unread,
Jul 13, 2018, 1:44:17 PM7/13/18
to microp...@googlegroups.com
Hi Heiko,

I did just the quick replacement for the moment, making it work already for MP 1.2

It is online if you want to have a look at it.

I'll use the info from the link you specified to create a version for MP1.3 (I hope to do that the beginning of next week)

Thanks for the info

Regards
Rudy


--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/kKsrLKLPEN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.

Rudy De Busscher

unread,
Jul 17, 2018, 2:29:37 PM7/17/18
to microp...@googlegroups.com
Based on the info from the link from Heiko, I added Thorntail v2 server to the list when selecting MP1.3.

Updated version is deployed online (1)

Emily Jiang

unread,
Jul 17, 2018, 5:10:20 PM7/17/18
to Eclipse MicroProfile
Thanks Rudy!

Just a couple of minor comments:
1. On the FaultToleranceController
@Path("/fault")
@ApplicationScoped // Required for Liberty

I suggest the path to be /resilient

and remove the comment as it is not related to Liberty. Fault Tolerance Spec relies CDI. It works on CDI beans.

2. I suggest deleting the beans.xml as it does not add any value. The absence of the file also means implicit bean archives.


Thanks
Emily

Rudy De Busscher

unread,
Jul 18, 2018, 1:02:34 AM7/18/18
to microp...@googlegroups.com
Emily,

I'll change the path and remove the comment (but in fact, Liberty is the only one which needs the Controller to be defined explicitly as CDI bean in order to make it work)

The annotated mode is for most companies the standard so I would leave that one in. I can test without the beans.xml and put then a comment in the file that it is also possible to remove it (when I don't find any issues with the implicit archives where I had issues in the past at some cases - not MicroProfile related)

Thx for testing
Rudy


Guillermo González de Agüero

unread,
Jul 18, 2018, 1:49:29 AM7/18/18
to microp...@googlegroups.com
WildFly and I guess now also Payara treat JAX-RS resources as CDI beans via propietary mechanisms.

Removing beans.xml would maintain the annotated discovery mode, no? So it would be safe to remove.


Regards,

Guillermo González de Agüero

You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.

To post to this group, send email to microp...@googlegroups.com.

Rudy De Busscher

unread,
Jul 18, 2018, 6:40:32 AM7/18/18
to microp...@googlegroups.com
Guillermo,
 
Removing beans.xml would maintain the annotated discovery mode, no? So it would be safe to remove

For the JAX-RS resources, yes, but there are most likely other classes which qualify for CDI beans for which it makes a difference.

Regards
Rudy

Ondro Mihályi

unread,
Jul 18, 2018, 8:38:36 PM7/18/18
to Eclipse MicroProfile
Having beans.xml in a template project is helpful. If users need to modify it, it's already there. If they don't need it, setting discovery to anotated retains the same behaviour as if it wasn't there.

Ad. CDI controller, I'm pretty sure that also Payara requires that REST client interface has a scope annotation, otherwise it doesn't inject it.

--Ondro

Emily Jiang

unread,
Jul 19, 2018, 11:46:04 AM7/19/18
to Eclipse MicroProfile

I'll change the path and remove the comment (but in fact, Liberty is the only one which needs the Controller to be defined explicitly as CDI bean in order to make it work)

JAX-RS are not CDI beans according to CDI specs or JavaEE7/8 specs. As commented by Ondro, Payara is same as Liberty. I am not sure whether Thorntail automatically treats JAX-RS as CDI Beans. If so, it will not be portable as it does not comply with the spec.

Thanks
Emily

Emily Jiang

unread,
Jul 19, 2018, 12:10:14 PM7/19/18
to Eclipse MicroProfile

I vote for less file in the generation code. I think we should just generate the files we need. Nothing more. If someone wants to add it, it is fine. Otherwise, people will have to delete the unwanted ones. I had that experience before and did not want to do the deletion again.


Thanks

Emily

Rudy De Busscher

unread,
Jul 19, 2018, 1:24:41 PM7/19/18
to microp...@googlegroups.com
Emily,

Regarding JAX-RS resources and CDI treatment, there are differences between implementations, also between Payara and Liberty.

It is true that JAX-RS resources must have defined as CDI beans before you can inject something in it (like Ondro said) but in Payara the Fault tolerance annotations (like @Fallback and @TimeOut) work without the need to define them explicitly as CDI bean.

Anyway, as it is recommended that they should be CDI beans, I'll add the @ApplicationScoped to the resources for all implementations.

Rudy

Rudy De Busscher

unread,
Jul 19, 2018, 1:25:24 PM7/19/18
to microp...@googlegroups.com
What about an option to generate the beans.xml? Off by default.

Then we can satisfy all parties.

--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/kKsrLKLPEN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.

Emily Jiang

unread,
Jul 19, 2018, 5:03:23 PM7/19/18
to Eclipse MicroProfile
sounds good. When you choose to generate the file, I would say put the bean-discovery-mode="all".
Thanks
Emily

Mark Struberg

unread,
Jul 29, 2018, 9:31:14 AM7/29/18
to Eclipse MicroProfile
Hi Rudy!

Nope, this is actually the only _portable_ way to get a JAX-RS Endpoint registered without having to add it to web.xml
Containers _might_ support more ways to detect Resources, but those ways are not portable across vendors.

LieGrue,
strub

Ondro Mihályi

unread,
Jul 30, 2018, 3:48:40 AM7/30/18
to MicroProfile
Hi Rudy,

Isn't annotated mode the same as if beans.xml isn't in the archive? What's the difference? However, I don't mind if beans.xml is in the generated project even if it's the same.

And I agree with Mark that turning JAX-RS into CDI is needed for a portable code. WF Sawrm and Payara don't need it but that's a vendor-specific behavior - they turn all resources into request scoped CDI beans automatically. Payara added it only this year.

--Ondro

Dňa ne 29. 7. 2018, 15:31 Mark Struberg <markst...@gmail.com> napísal(a):

Rudy De Busscher

unread,
Jul 30, 2018, 4:30:57 AM7/30/18
to microp...@googlegroups.com
To my knowledge, implicit bean archives are equivalent to discovery-mode all.

Resources must not be a CDI bean in order to be discovered when there is an Application subclass defined. (from 2.3.2 in the spec)

When an Application subclass is present in the archive, if both Application.getClasses and Application.getSingletons return an empty collection then all root resource classes and providers packaged in the web application MUST be included and the JAX-RS implementation is REQUIRED to discover them automatically by scanning a .war file as described above.

But I have added CDI scopes to the resources generated by Jessie as it seems required for some MP implementations (although the spec doesn't explicitly indicate it as REQUIRED, but MP relies on CDI of course)

Rudy


Ondro Mihályi

unread,
Jul 30, 2018, 8:05:49 AM7/30/18
to MicroProfile
I'm pretty sure that for implicit archives (without beans.xml) bean discovery is annotated and not all. If you want discovery=all you need to specify it in beqns.xml. In EE6, an empty beans.xml meant discovery=all, and I think this stayed in EE7, maybe that confused you.

Rwgarding the section in JAX-RS it's true in Java EE containers so it doesn't apply in MP. MicroProfile isn't JavaEE so the inly MicroProfile-portable way is to make resources also CDI beans.

Many MP conttainers aree also JavaEE containers and there autodiscovery of resources works in them even without CDI. But since some MP feature work only in CDI it makes sense to always turn resources into CDI beans.

So in summary, this should be the default in MP:

- annotatioin bean discovery (e.g. no beans.xml)
- resources marked with a CDI annotation (request scope is recommended because JAX-RS spec says that resource instances are normally recreated for each request)

--Ondro

Dňa po 30. 7. 2018, 10:30 Rudy De Busscher <rdebu...@gmail.com> napísal(a):

Rudy De Busscher

unread,
Jul 30, 2018, 3:09:20 PM7/30/18
to microp...@googlegroups.com
an empty beans.xml meant discovery=all, and I think this stayed in EE7, maybe that confused you.

Probably, thx for the refresher.

Rwgarding the section in JAX-RS it's true in Java EE containers so it doesn't apply in MP. MicroProfile isn't JavaEE so the inly MicroProfile-portable way is to make resources also CDI beans.

Since MP is built on top of those Java EE specs (like JAX-RS) my impression/assumption was that it worked the same way (for example that CDI is not needed for JAX-RS resources unless you use CDI specific things like injection.)
Shouldn't it be mentioned in the MP spec then that all JAX-RS resources need to be CDI beans in order to be compliant? 

Rudy

Alasdair Nottingham

unread,
Aug 8, 2018, 6:21:48 PM8/8/18
to microp...@googlegroups.com
Yes I think it should be stated in the spec. I think if you dig you can find where it is said in JAXRS and CDI, but saying it explicitly would be very useful. I think I was given an an action two weeks ago on this, but sadly I’ve been snowed under for the last few weeks. I’ll try to look when I’m in the office again next week. It shouldn’t be difficult to add to the next spec revision. 

Alasdair Nottingham
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.

To post to this group, send email to microp...@googlegroups.com.

donbo...@gmail.com

unread,
Aug 26, 2018, 3:19:06 PM8/26/18
to Eclipse MicroProfile
Hi Rudy,

I was giving this a try today and noticed the generated readme.md file section dealing with metrics has an issue.  

Currently it says...

### Metrics

The Metrics exports _Telemetric_ data in a uniform way of system and custom resources. Specification [here](https://microprofile.io/project/eclipse/microprofile-health)


the link is incorrect -- it should say...

### Metrics

The Metrics exports _Telemetric_ data in a uniform way of system and custom resources. Specification [here](https://microprofile.io/project/eclipse/microprofile-metrics)

Regards,
Don

On Wednesday, July 11, 2018 at 3:01:01 PM UTC-4, Rudy De Busscher wrote:
All,

As discussed earlier, I have created a special version of Jessie called MicroProfile Starter (based on the consensus of the name) which generates a starter application for MicroProfile based implementations.

You can test it here (1)

Any issues or comments, let me know and I'll take a look at it.

Let me know if I need to do something if this needs to be integrated into http://start.microprofile.io site (see https://github.com/microprofile/microprofile-site/issues/27)

Rudy De Busscher

unread,
Aug 27, 2018, 7:20:48 AM8/27/18
to Eclipse MicroProfile
Hi Don,

Thanks for the report. I have updated the readme.

regards
Rudy

Cesar Saavedra

unread,
Sep 18, 2018, 3:27:30 PM9/18/18
to Eclipse MicroProfile
Hi Rudy,

The MP Hangout call just ended and I got the action item to reach out to you about the status of start.microprofile.io.  Are you done with revisions? Where are you located? I'd like to set up a call to synch up and then start planning its move and accessibility from start.microprofile.io.

Thanks,
Cesar

Rudy De Busscher

unread,
Sep 19, 2018, 7:47:36 AM9/19/18
to microp...@googlegroups.com
Hi Cesar,

The only thing I did for the moment is requesting a Git repository (still needs a +1 of a project lead).
 I understood from the meeting end of August that a new design (screen layouts) would be made by someone so that I could implement them.

I'm currently very busy with a lot of things including the preparation of my presentation at the upcoming conferences. So my availability to work on MicroProfile start is rather low the coming six weeks or so.

I'm located in Belgium, GMT+2.

best regards
Rudy

--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/kKsrLKLPEN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.

Emily Jiang

unread,
Sep 19, 2018, 11:08:35 AM9/19/18
to Eclipse MicroProfile
Hi Rudy,

The repo you requested has been created here. When you are free, please go ahead to create PRs.

Thanks
Emily

Cesar Saavedra

unread,
Sep 27, 2018, 11:56:03 AM9/27/18
to MicroProfile, Cesar Saavedra
Hi Rudy,

Since you're so busy and time is of the essence, I'm thinking that we could hire an agency to handle this task.  Would you mind sharing the location of all your MicroProfile starter assets that are needed to be migrated?

Cesar


For more options, visit https://groups.google.com/d/optout.


--
Cesar Saavedra
Senior Principal Technical Product Marketing Manager

Rudy De Busscher

unread,
Sep 27, 2018, 3:05:25 PM9/27/18
to microp...@googlegroups.com
Hi Cesar,

My latest version can be found here: https://github.com/rdebusscher/MicroProfile-start

I had planned to work a bit on it tomorrow but it is fine if someone takes it over from me.

Best regards
Rudy

Cesar Saavedra

unread,
Sep 28, 2018, 4:20:29 AM9/28/18
to microp...@googlegroups.com
Hi Rudy,

If you have some cycles to work on it today, please go ahead. The work could be transferred at any point in time. Finding an agency and organizing a kickoff call with you for knowledge transfer is going to take a few days anyway.
I think Emily already created a repo for you to move your assets to. Not sure if you were planning to do a PR today to start the transfer today or something else. But if you were planning on working on it today, please go ahead and we would sync up the work once a agency is selected. Does that make sense?

Thanks,
Cesar


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages