AG UPS deadlock
by Ivan Gürtler
Hi, we use two AG unified push servers with Oracle DB in cluster, but we
have some problem with deadlock (probably caused by clean up by both
servers at the same time).
We used DB owner PUSHSRVAG and application DB account APUSHSRVAG.
(version ... my fork (with small change in dev) ...
https://github.com/IvanGurtler/aerogear-unifiedpush-server/tree/MyBranch)
Is possible change some settings to prevent deadlock ? or some different
solution ?
-----------------------------------------------------------------------------------------
*** 2015-04-10 00:00:04.506
*** SESSION ID:(84.48937) 2015-04-10 00:00:04.506
*** CLIENT ID:() 2015-04-10 00:00:04.506
*** SERVICE NAME:(SYS$USERS) 2015-04-10 00:00:04.506
*** MODULE NAME:(JDBC Thin Client) 2015-04-10 00:00:04.506
*** CLIENT DRIVER:(jdbcthin) 2015-04-10 00:00:04.506
*** ACTION NAME:() 2015-04-10 00:00:04.506
*** 2015-04-10 00:00:04.506
DEADLOCK DETECTED ( ORA-00060 )
See Note 60.1 at My Oracle Support for Troubleshooting ORA-60 Errors
[Transaction Deadlock]
The following deadlock is not an ORACLE error. It is a
deadlock due to user error in the design of an application
or from issuing incorrect ad-hoc SQL. The following
information may aid in determining the deadlock:
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session
holds waits process session holds waits
TM-00013891-00000000-00000000-00000000 142 84 SX SSX
144 162 SX SSX
TM-00013891-00000000-00000000-00000000 144 162 SX SSX
142 84 SX SSX
Rows waited on:
Session 84: no row
Session 162: no row
----- Information for the OTHER waiting sessions -----
Session 162:
sid: 162 ser: 54036 audsid: 10790094 user: 115/APUSHSRVAG
flags: (0x41) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
flags2: (0x40009) -/-/INC
pid: 144 O/S info: user: oracle, term: UNKNOWN, ospid: 11534420
image: oracle@s16000ks
client details:
O/S info: user: jbotp, term: unknown, ospid: 1234
machine: s1.sk.srv.acc.sys program: JDBC Thin Client
application name: JDBC Thin Client, hash value=2546894660
current SQL:
delete from PUSHSRVAG.PushMessageInformation where submitDate<:1
----- End of information for the OTHER waiting sessions -----
Information for THIS session:
----- Current SQL Statement for this session (sql_id=bsk109wpq55yg) -----
delete from PUSHSRVAG.PushMessageInformation where submitDate<:1
-----------------------------------------------------------------------------------------
Thanks
*Mgr. Ivan Gürtler*
Mobile software developer
AHEAD iTec, s.r.o., Botanická 554/68a,
602 00 Brno (Czech Republic)
www.ahead-itec.com | twitter <https://www.twitter.com/AHEADiTec> | mobile
security solutions
9 years, 8 months
[UPS] Advanced Analytics
by Sebastien Blanc
Folks !
For AGPUSH-969[1] and to kick off the discussions, I started a small POC
mainly focused on the backend. To sum up quickly : we want to know how many
installations/users has opened the application after that a Push
Notification has been touched.
So, the very first thing that had to be done was to give the Push
Notification a unique identifier, so that we can track it and do the
metrics on it.
For that, I have been using an existing model object that we have , the
PushMessageInformation[2], and that is currently used to provide
information for our dashboard.
This object has now some extra fields, like a appOpenCounter etc ...
The ID of this PushMessageInformation is now passed into the payload of the
Push Message, just before we send it, this way the client library can use
this ID to pass extra information to the UPS when a notification is
touched.
For this POC, I hijacked the cordova-helloworld, so that it extracts the ID
from the payload and pass it as header when registering.
When the UPS receive the request, it looks for the header and if it exist
it updates the existing PushMessageInformation instance.
Please note, that for this POC, all is happening on Application level and
not on Variant level but that can be easily changed. It depends on how
fined grained we want to have these analytics.
I did a small screencast that shows this in action :
https://www.youtube.com/watch?v=PseBBJZLz6s&feature=youtu.be
The UPS branch containing the changes is here (the 2 latests commits are
relevant) :
https://github.com/sebastienblanc/aerogear-unified-push-server/tree/analy...
The client app is not really relevant since I really hacked badly the app
(and the push plugin) ;) , however if interested I may share it.
Now, let's discuss :)
Sebi
[1] https://issues.jboss.org/browse/AGPUSH-969
[2]
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model...
9 years, 8 months
Fwd: License Key for AeroGear UnifiedPush Server (was: Re: do we want swagger for REST endpoint documentation?)
by Matthias Wessendorf
Hi Yves,
thanks a lot!
Idel, below is the license key - I saw (looking at your Tika link) it needs
to be included on the pom.xml file.
Cheers,
Matthias
---------- Forwarded message ----------
From: Yves Vandewoude <yves.vandewoude(a)miredot.com>
Date: Thu, Apr 9, 2015 at 10:07 AM
Subject: Re: License Key for AeroGear UnifiedPush Server (was: Re:
[aerogear-dev] do we want swagger for REST endpoint documentation?)
To: Matthias Wessendorf <matzew(a)apache.org>
Hello Matthias,
The licence key for the AeroGear UnifiedPush Server project is:
<licence>cHJvamVjdHxvcmcuamJvc3MuYWVyb2dlYXIudW5pZmllZHB1c2gudW5pZmllZHB1c2gtamF4cnN8MjAxNy0wNS0wMXx0cnVlfC0xI01Dd0NGQitaa0VVRVlsaU9LQjljR2h5TWNSWm1VMTREQWhRbUlHOXY3MExCR0FoT2FubklFSER2SWl1OVZnPT0=</licence>
It is valid for two years (until May 1st 2017) for
org.jboss.aerogear.unifiedpush / unifiedpush-jaxrs
After that, you are free to request a new licence key.
We continuously aim to improve our tool, so do not hesitate to contact us
if you have any questions or remarks. Support questions are best sent to
support(a)miredot.com, since they are dealt with by a team instead of just me
:)
Kind regards,
Yves
Matthias Wessendorf schreef op 9/04/2015 om 9:46:
Hi Miredot team,
for the AeroGear UnifiedPush Server ([1], [2]), we would like to start
using miredot for our jaxrs endpoints ([3]). The Maven groupId is
"org.jboss.aerogear.unifiedpush" and the artifactId is "unifiedpush-jaxrs".
Currently we are using jaxrs-doclet ([4]), but we are not happy with that.
The Server is an OpenSource project with regular releases, and it is
licensed under the Apache 2.0 license.
For this project we would like to request an opensource license.
Thanks,
Matthias
[1] https://aerogear.org/push/#unifiedpush
[2] https://aerogear.org/docs/unifiedpush/ups_userguide/index/
[3]
https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/jaxrs
[4]
https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/overview-index....
On Tue, Apr 7, 2015 at 1:57 PM, Idel Pivnitskiy <idel.pivnitskiy(a)gmail.com>
wrote:
> Ok, so I will wait a license key from you.
>
> 2015-04-07 14:55 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>
>>
>>
>> On Tue, Apr 7, 2015 at 1:42 PM, Idel Pivnitskiy <
>> idel.pivnitskiy(a)gmail.com> wrote:
>>
>>> IMO, custom annotations force you to duplicate code and documentation.
>>> Take a look at a more detailed example:
>>>
>>> @POST
>>> @Path("/{petId}")
>>> @Consumes({MediaType.APPLICATION_FORM_URLENCODED})
>>> @ApiOperation(value = "Updates a pet in the store with form data",
>>> consumes = MediaType.APPLICATION_FORM_URLENCODED)
>>> @ApiResponses(value = {
>>> @ApiResponse(code = 405, message = "Invalid input")})
>>> public Response updatePetWithForm (
>>> @ApiParam(value = "ID of pet that needs to be updated", required = true)@PathParam("petId") String petId,
>>> @ApiParam(value = "Updated name of the pet", required = false)@FormParam("name") String name,
>>> @ApiParam(value = "Updated status of the pet", required = false)@FormParam("status") String status) {
>>> System.out.println(name);
>>> System.out.println(status);
>>> return Response.ok().entity(new com.wordnik.swagger.sample.model.ApiResponse(200, "SUCCESS")).build();
>>> }
>>>
>>> It is much more simple with MireDot (also because javadoc could be
>>> generated automatically by IDE):
>>>
>>> /**
>>> * Updates a pet in the store with form data.
>>> *
>>> * @param petId ID of pet that needs to be updated
>>> * @param name Updated name of the pet
>>> * @param status Updated status of the pet
>>> */
>>> @POST
>>> @Path("/{petId}")
>>> @Consumes({MediaType.APPLICATION_FORM_URLENCODED})
>>> public Response updatePetWithForm (@PathParam("petId") String petId,
>>> @FormParam("name") String name,
>>> @FormParam("status") String status) {
>>> System.out.println(name);
>>> System.out.println(status);
>>> return Response.ok().entity(new com.wordnik.swagger.sample.model.ApiResponse(200, "SUCCESS")).build();
>>> }
>>>
>>> Really, I don't know why Swagger is so popular :)
>>>
>>
>> That's quite a difference, and less verbose and less of duplication
>> (DRY). So I'd say, let's try Miredot :-)
>>
>> Thanks for the valuable info, Idel!
>>
>> -Matthias
>>
>>
>>>
>>> 2015-04-07 14:11 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>>>
>>>>
>>>>
>>>> On Tue, Apr 7, 2015 at 12:56 PM, Idel Pivnitskiy <
>>>> idel.pivnitskiy(a)gmail.com> wrote:
>>>>
>>>>> Yes, Swagger can generate doc on the fly, but Swagger use its own
>>>>> annotations instead of parse JAX-RS annotations and javadoc, like MireDot.
>>>>>
>>>>
>>>> Ok, I think I have not a huge concern against custom annotations,
>>>> especially due to the wide adoption of Swagger.
>>>> I guess it's just a very tiny JAR, that contains the annotations, right?
>>>>
>>>> (+ the build time tool dependency for processing)
>>>>
>>>>
>>>>> What about licence: Apache Tika, for example, uses pro version of
>>>>> MireDot
>>>>>
>>>>>
>>>>> https://github.com/apache/tika/blob/5fbc56cca94b9da0a914e82dd466abb139f9e...
>>>>>
>>>>
>>>> Thanks for the example, that's helpful
>>>>
>>>>
>>>>>
>>>>>
>>>>> 2015-04-07 13:48 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>>>>>
>>>>>> Swagger allows doc on the source as well, right ? Just wondering.
>>>>>>
>>>>>> REgarding license, I need to double check on that before...
>>>>>>
>>>>>> On Tue, Apr 7, 2015 at 11:57 AM, Idel Pivnitskiy <
>>>>>> idel.pivnitskiy(a)gmail.com> wrote:
>>>>>>
>>>>>>> Matthias,
>>>>>>>
>>>>>>> Sure, I will work on it.
>>>>>>> But I think that it would be better if you request a license [1] on
>>>>>>> your email and forward it to me.
>>>>>>> It won't be a problem to use a free version, but pro version has a
>>>>>>> very cool features, like:
>>>>>>>
>>>>>>> - Display javadoc comments for the fields of json payloads and
>>>>>>> enums
>>>>>>> - JSON field documentation
>>>>>>> - Type replacement (custom serialisation, JSON types)
>>>>>>>
>>>>>>> Please, request a li
>>>>>>>
>>>>>>> [1] http://miredot.com/price/
>>>>>>>
>>>>>>> 2015-04-07 12:44 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>>>>>>>
>>>>>>>> Idel,
>>>>>>>>
>>>>>>>> would you mind to create a branch for us, so we can investigate
>>>>>>>> the MireDot solution? also the build should be working w/ JDK8.
>>>>>>>>
>>>>>>>> ATM we use jax-doclet ([1]) which does not work w/ JDK 8 - but it
>>>>>>>> does not really use any fancy annotations (e.g. see [2]) - that's why we
>>>>>>>> picked it.
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>> Matthias
>>>>>>>>
>>>>>>>> [1] http://fromage.github.io/jax-doclets/docs/0.10.0/html/
>>>>>>>> [2]
>>>>>>>> https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs...
>>>>>>>>
>>>>>>>> On Tue, Apr 7, 2015 at 9:54 AM, Lukáš Fryč <lukas.fryc(a)gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> I agree with Idel that DRY approach in Miredot's case seems more
>>>>>>>>> appealing.
>>>>>>>>>
>>>>>>>>> They offer basic docs generation in Free version, but also Pro
>>>>>>>>> version for open-source projects under conditions that Aerogear meets [1].
>>>>>>>>>
>>>>>>>>> ~ Lukas
>>>>>>>>>
>>>>>>>>> [1] http://www.miredot.com/price/
>>>>>>>>>
>>>>>>>>> ne 5. 4. 2015 v 20:00 odesílatel Idel Pivnitskiy <
>>>>>>>>> idel.pivnitskiy(a)gmail.com> napsal:
>>>>>>>>>
>>>>>>>>> For JAX-RS I prefer use MireDot as a REST API doc generator
>>>>>>>>>> http://www.miredot.com/
>>>>>>>>>>
>>>>>>>>>> With MireDot you do not need to use additional annotations,
>>>>>>>>>> like @Api:
>>>>>>>>>>
>>>>>>>>>> @Path("/pet")
>>>>>>>>>> @Api(value = "/pet", description = "Operations about pets")
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> It will parse your JAX-RS annotation and pure javadoc:
>>>>>>>>>>
>>>>>>>>>> /**
>>>>>>>>>> * Operations about pets
>>>>>>>>>> */
>>>>>>>>>> @Path("/pet")
>>>>>>>>>>
>>>>>>>>>> and generate beautiful and user friendly documentation, like
>>>>>>>>>> this: http://www.miredot.com/exampledocs/
>>>>>>>>>> Swagger example: http://petstore.swagger.io/
>>>>>>>>>>
>>>>>>>>>> And MireDot is free for open source projects!
>>>>>>>>>>
>>>>>>>>>> Think about this alternative for Swagger. I'm able to prepare
>>>>>>>>>> Pull Request for UPS next week.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2015-04-04 9:43 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Apr 3, 2015 at 10:27 PM, Heiko W.Rupp <hrupp(a)redhat.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> On 3 Apr 2015, at 18:53, Andrea Vibelli wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> > we are using it in Project Newcastle with annotations on the
>>>>>>>>>>>> > endpoints, and
>>>>>>>>>>>> > it's really handy.
>>>>>>>>>>>>
>>>>>>>>>>>> All the JBoss ON 3.2+ and RHQ REST-docs are generated from
>>>>>>>>>>>> JAX-RS +
>>>>>>>>>>>> Swagger annotations.
>>>>>>>>>>>> In Hawkular we are basically doing the same, but with a
>>>>>>>>>>>> different
>>>>>>>>>>>> annotation processor.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> +1000
>>>>>>>>>>>
>>>>>>>>>>> we are, atm, doing similar:
>>>>>>>>>>> source
>>>>>>>>>>>
>>>>>>>>>>> https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs...
>>>>>>>>>>> result:
>>>>>>>>>>>
>>>>>>>>>>> https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/sender/index.ht...
>>>>>>>>>>>
>>>>>>>>>>> but the jaxrs doclet does not work w/ JDK8 - something has to
>>>>>>>>>>> change here ;-)
>>>>>>>>>>> So, I am all for using Swagger annotations on the code to
>>>>>>>>>>> generate the HTML docs :-)
>>>>>>>>>>>
>>>>>>>>>>> Greetings,
>>>>>>>>>>> Matthias
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I personally think the best is really to have the annotations
>>>>>>>>>>>> in the
>>>>>>>>>>>> source and not trying
>>>>>>>>>>>> to update a separate .yml file, as the latter usually is much
>>>>>>>>>>>> easier
>>>>>>>>>>>> forgotten.
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>>
>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best regards,
>>>>>>>>>> Idel Pivnitskiy
>>>>>>>>>> E-mail: Idel.Pivnitskiy(a)gmail.com
>>>>>>>>>> Twitter: @idelpivnitskiy <https://twitter.com/idelpivnitskiy>
>>>>>>>>>> GitHub: @idelpivnitskiy <https://github.com/idelpivnitskiy>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> aerogear-dev mailing list
>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> aerogear-dev mailing list
>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>> Idel Pivnitskiy
>>>>>>> E-mail: Idel.Pivnitskiy(a)gmail.com
>>>>>>> Twitter: @idelpivnitskiy <https://twitter.com/idelpivnitskiy>
>>>>>>> GitHub: @idelpivnitskiy <https://github.com/idelpivnitskiy>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> aerogear-dev mailing list
>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matthias Wessendorf
>>>>>>
>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>
>>>>>> _______________________________________________
>>>>>> aerogear-dev mailing list
>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> aerogear-dev mailing list
>>>>> aerogear-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Matthias Wessendorf
>>>>
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>>
>>>> _______________________________________________
>>>> aerogear-dev mailing list
>>>> aerogear-dev(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
>
> --
> Best regards,
> Idel Pivnitskiy
> E-mail: Idel.Pivnitskiy(a)gmail.com
> Twitter: @idelpivnitskiy <https://twitter.com/idelpivnitskiy>
> GitHub: @idelpivnitskiy <https://github.com/idelpivnitskiy>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
9 years, 8 months
License Key for AeroGear UnifiedPush Server (was: Re: do we want swagger for REST endpoint documentation?)
by Matthias Wessendorf
Hi Miredot team,
for the AeroGear UnifiedPush Server ([1], [2]), we would like to start
using miredot for our jaxrs endpoints ([3]). The Maven groupId is
"org.jboss.aerogear.unifiedpush" and the artifactId is "unifiedpush-jaxrs".
Currently we are using jaxrs-doclet ([4]), but we are not happy with that.
The Server is an OpenSource project with regular releases, and it is
licensed under the Apache 2.0 license.
For this project we would like to request an opensource license.
Thanks,
Matthias
[1] https://aerogear.org/push/#unifiedpush
[2] https://aerogear.org/docs/unifiedpush/ups_userguide/index/
[3]
https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/jaxrs
[4]
https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/overview-index....
On Tue, Apr 7, 2015 at 1:57 PM, Idel Pivnitskiy <idel.pivnitskiy(a)gmail.com>
wrote:
> Ok, so I will wait a license key from you.
>
> 2015-04-07 14:55 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>
>>
>>
>> On Tue, Apr 7, 2015 at 1:42 PM, Idel Pivnitskiy <
>> idel.pivnitskiy(a)gmail.com> wrote:
>>
>>> IMO, custom annotations force you to duplicate code and documentation.
>>> Take a look at a more detailed example:
>>>
>>> @POST
>>> @Path("/{petId}")
>>> @Consumes({MediaType.APPLICATION_FORM_URLENCODED})
>>> @ApiOperation(value = "Updates a pet in the store with form data",
>>> consumes = MediaType.APPLICATION_FORM_URLENCODED)
>>> @ApiResponses(value = {
>>> @ApiResponse(code = 405, message = "Invalid input")})
>>> public Response updatePetWithForm (
>>> @ApiParam(value = "ID of pet that needs to be updated", required = true)@PathParam("petId") String petId,
>>> @ApiParam(value = "Updated name of the pet", required = false)@FormParam("name") String name,
>>> @ApiParam(value = "Updated status of the pet", required = false)@FormParam("status") String status) {
>>> System.out.println(name);
>>> System.out.println(status);
>>> return Response.ok().entity(new com.wordnik.swagger.sample.model.ApiResponse(200, "SUCCESS")).build();
>>> }
>>>
>>>
>>> It is much more simple with MireDot (also because javadoc could be
>>> generated automatically by IDE):
>>>
>>> /**
>>> * Updates a pet in the store with form data.
>>> *
>>> * @param petId ID of pet that needs to be updated
>>> * @param name Updated name of the pet
>>> * @param status Updated status of the pet
>>> */
>>> @POST
>>> @Path("/{petId}")
>>> @Consumes({MediaType.APPLICATION_FORM_URLENCODED})
>>> public Response updatePetWithForm (@PathParam("petId") String petId,
>>> @FormParam("name") String name,
>>> @FormParam("status") String status) {
>>> System.out.println(name);
>>> System.out.println(status);
>>> return Response.ok().entity(new com.wordnik.swagger.sample.model.ApiResponse(200, "SUCCESS")).build();
>>> }
>>>
>>> Really, I don't know why Swagger is so popular :)
>>>
>>
>> That's quite a difference, and less verbose and less of duplication
>> (DRY). So I'd say, let's try Miredot :-)
>>
>> Thanks for the valuable info, Idel!
>>
>> -Matthias
>>
>>
>>>
>>> 2015-04-07 14:11 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>>>
>>>>
>>>>
>>>> On Tue, Apr 7, 2015 at 12:56 PM, Idel Pivnitskiy <
>>>> idel.pivnitskiy(a)gmail.com> wrote:
>>>>
>>>>> Yes, Swagger can generate doc on the fly, but Swagger use its own
>>>>> annotations instead of parse JAX-RS annotations and javadoc, like MireDot.
>>>>>
>>>>
>>>> Ok, I think I have not a huge concern against custom annotations,
>>>> especially due to the wide adoption of Swagger.
>>>> I guess it's just a very tiny JAR, that contains the annotations, right?
>>>>
>>>> (+ the build time tool dependency for processing)
>>>>
>>>>
>>>>> What about licence: Apache Tika, for example, uses pro version of
>>>>> MireDot
>>>>>
>>>>>
>>>>> https://github.com/apache/tika/blob/5fbc56cca94b9da0a914e82dd466abb139f9e...
>>>>>
>>>>
>>>> Thanks for the example, that's helpful
>>>>
>>>>
>>>>>
>>>>>
>>>>> 2015-04-07 13:48 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>>>>>
>>>>>> Swagger allows doc on the source as well, right ? Just wondering.
>>>>>>
>>>>>> REgarding license, I need to double check on that before...
>>>>>>
>>>>>> On Tue, Apr 7, 2015 at 11:57 AM, Idel Pivnitskiy <
>>>>>> idel.pivnitskiy(a)gmail.com> wrote:
>>>>>>
>>>>>>> Matthias,
>>>>>>>
>>>>>>> Sure, I will work on it.
>>>>>>> But I think that it would be better if you request a license [1] on
>>>>>>> your email and forward it to me.
>>>>>>> It won't be a problem to use a free version, but pro version has a
>>>>>>> very cool features, like:
>>>>>>>
>>>>>>> - Display javadoc comments for the fields of json payloads and
>>>>>>> enums
>>>>>>> - JSON field documentation
>>>>>>> - Type replacement (custom serialisation, JSON types)
>>>>>>>
>>>>>>> Please, request a li
>>>>>>>
>>>>>>> [1] http://miredot.com/price/
>>>>>>>
>>>>>>> 2015-04-07 12:44 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>:
>>>>>>>
>>>>>>>> Idel,
>>>>>>>>
>>>>>>>> would you mind to create a branch for us, so we can investigate the
>>>>>>>> MireDot solution? also the build should be working w/ JDK8.
>>>>>>>>
>>>>>>>> ATM we use jax-doclet ([1]) which does not work w/ JDK 8 - but it
>>>>>>>> does not really use any fancy annotations (e.g. see [2]) - that's why we
>>>>>>>> picked it.
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>> Matthias
>>>>>>>>
>>>>>>>> [1] http://fromage.github.io/jax-doclets/docs/0.10.0/html/
>>>>>>>> [2]
>>>>>>>> https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs...
>>>>>>>>
>>>>>>>> On Tue, Apr 7, 2015 at 9:54 AM, Lukáš Fryč <lukas.fryc(a)gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> I agree with Idel that DRY approach in Miredot's case seems more
>>>>>>>>> appealing.
>>>>>>>>>
>>>>>>>>> They offer basic docs generation in Free version, but also Pro
>>>>>>>>> version for open-source projects under conditions that Aerogear meets [1].
>>>>>>>>>
>>>>>>>>> ~ Lukas
>>>>>>>>>
>>>>>>>>> [1] http://www.miredot.com/price/
>>>>>>>>>
>>>>>>>>> ne 5. 4. 2015 v 20:00 odesílatel Idel Pivnitskiy <
>>>>>>>>> idel.pivnitskiy(a)gmail.com> napsal:
>>>>>>>>>
>>>>>>>>> For JAX-RS I prefer use MireDot as a REST API doc generator
>>>>>>>>>> http://www.miredot.com/
>>>>>>>>>>
>>>>>>>>>> With MireDot you do not need to use additional annotations, like
>>>>>>>>>> @Api:
>>>>>>>>>>
>>>>>>>>>> @Path("/pet")
>>>>>>>>>> @Api(value = "/pet", description = "Operations about pets")
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> It will parse your JAX-RS annotation and pure javadoc:
>>>>>>>>>>
>>>>>>>>>> /**
>>>>>>>>>> * Operations about pets
>>>>>>>>>> */
>>>>>>>>>> @Path("/pet")
>>>>>>>>>>
>>>>>>>>>> and generate beautiful and user friendly documentation, like
>>>>>>>>>> this: http://www.miredot.com/exampledocs/
>>>>>>>>>> Swagger example: http://petstore.swagger.io/
>>>>>>>>>>
>>>>>>>>>> And MireDot is free for open source projects!
>>>>>>>>>>
>>>>>>>>>> Think about this alternative for Swagger. I'm able to prepare
>>>>>>>>>> Pull Request for UPS next week.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2015-04-04 9:43 GMT+03:00 Matthias Wessendorf <matzew(a)apache.org>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Apr 3, 2015 at 10:27 PM, Heiko W.Rupp <hrupp(a)redhat.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> On 3 Apr 2015, at 18:53, Andrea Vibelli wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> > we are using it in Project Newcastle with annotations on the
>>>>>>>>>>>> > endpoints, and
>>>>>>>>>>>> > it's really handy.
>>>>>>>>>>>>
>>>>>>>>>>>> All the JBoss ON 3.2+ and RHQ REST-docs are generated from
>>>>>>>>>>>> JAX-RS +
>>>>>>>>>>>> Swagger annotations.
>>>>>>>>>>>> In Hawkular we are basically doing the same, but with a
>>>>>>>>>>>> different
>>>>>>>>>>>> annotation processor.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> +1000
>>>>>>>>>>>
>>>>>>>>>>> we are, atm, doing similar:
>>>>>>>>>>> source
>>>>>>>>>>> https://github.com/aerogear/aerogear-unifiedpush-server/
>>>>>>>>>>> blob/master/jaxrs/src/main/java/org/jboss/aerogear/
>>>>>>>>>>> unifiedpush/rest/sender/PushNotificationSenderEndpoint
>>>>>>>>>>> .java#L99-L102
>>>>>>>>>>> result:
>>>>>>>>>>> https://aerogear.org/docs/specs/aerogear-unifiedpush-
>>>>>>>>>>> rest/sender/index.html#POST
>>>>>>>>>>>
>>>>>>>>>>> but the jaxrs doclet does not work w/ JDK8 - something has to
>>>>>>>>>>> change here ;-)
>>>>>>>>>>> So, I am all for using Swagger annotations on the code to
>>>>>>>>>>> generate the HTML docs :-)
>>>>>>>>>>>
>>>>>>>>>>> Greetings,
>>>>>>>>>>> Matthias
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I personally think the best is really to have the annotations
>>>>>>>>>>>> in the
>>>>>>>>>>>> source and not trying
>>>>>>>>>>>> to update a separate .yml file, as the latter usually is much
>>>>>>>>>>>> easier
>>>>>>>>>>>> forgotten.
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>>
>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best regards,
>>>>>>>>>> Idel Pivnitskiy
>>>>>>>>>> E-mail: Idel.Pivnitskiy(a)gmail.com
>>>>>>>>>> Twitter: @idelpivnitskiy <https://twitter.com/idelpivnitskiy>
>>>>>>>>>> GitHub: @idelpivnitskiy <https://github.com/idelpivnitskiy>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> aerogear-dev mailing list
>>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> aerogear-dev mailing list
>>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>> Idel Pivnitskiy
>>>>>>> E-mail: Idel.Pivnitskiy(a)gmail.com
>>>>>>> Twitter: @idelpivnitskiy <https://twitter.com/idelpivnitskiy>
>>>>>>> GitHub: @idelpivnitskiy <https://github.com/idelpivnitskiy>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> aerogear-dev mailing list
>>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matthias Wessendorf
>>>>>>
>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>
>>>>>> _______________________________________________
>>>>>> aerogear-dev mailing list
>>>>>> aerogear-dev(a)lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> aerogear-dev mailing list
>>>>> aerogear-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Matthias Wessendorf
>>>>
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>>
>>>> _______________________________________________
>>>> aerogear-dev mailing list
>>>> aerogear-dev(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
>
> --
> Best regards,
> Idel Pivnitskiy
> E-mail: Idel.Pivnitskiy(a)gmail.com
> Twitter: @idelpivnitskiy <https://twitter.com/idelpivnitskiy>
> GitHub: @idelpivnitskiy <https://github.com/idelpivnitskiy>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
9 years, 8 months
Quick survey
by Andres Galante
This is off topic:
The patternfly team is having a booth at deviation, and apart from the
usual shirts and stickers we want to give away a bigger item (or a bunch of
them). We came up with a list, can you help us decide:
https://www.surveymonkey.com/s/2KVZNQL
Thanks!
9 years, 8 months