Skip navigation

I just work on a jive plugin with should modify blogPost. And for me it looks like there is something wrong or weird in the internal Api.


In the interface if found this:


 * Saves the state of this BlogPost to the database 
 * @param fireModifiedEvent true if a modified event should get fired after the blog is saved. 
 * @throws UnauthorizedException If the user is not allowed to modify this blogpost 
 * @throws IllegalArgumentException if the subject has already been used on this blog on the given publish date 
void save(boolean fireModifiedEvent) throws UnauthorizedException;  



In the implementation of the method signature looks like this:


@Transactional(readOnly = false, propagation = Propagation.REQUIRED)  
public void save(boolean runInterceptors) {  

 That doesn't match. And when i look further in the method I found this:

// In the case of a moderated post we don't want to send a modified event  
// before sending out a created event.  
// That only happens when the status is changed from PUBLISHED to AWAITING_MODERATION. Fixed    
if (!(existingPost.getStatus() == Status.PUBLISHED && this.getStatus() == Status.AWAITING_MODERATION )) {  

boolean shouldFeed = this.getStatus().isVisible();  

    Map<String, Object> paramMap = new HashMap<String, Object>();  
    paramMap.put(BlogPostEvent.KEY_EXISTING_POST_STATUS, existingPost.getStatus()); 

    BlogPostEvent event; 

if (existingPost.getStatus() != Status.PUBLISHED && shouldFeed) {  
        event = new BlogPostEvent(BlogPostEvent.Type.CREATED, this, paramMap);  
    } else {  
        event = new BlogPostEvent(BlogPostEvent.Type.MODIFIED, this, paramMap);  



So it looks like a blogPost event is fired when


!(existingPost.getStatus() == Status.PUBLISHED && this.getStatus() == Status.AWAITING_MODERATION )


So for me. It looks like the save(boolean fireModifiedEvent) does fire modified events when the parameter is set to false. Does anybody know how i can save a BlogPost without firing a modifed event. Only with the BlogPostBean?




The jive 5 has many imporvements in terms of webservices. There are primarily REST and SOAP based services and some places both*.


Most of the existing webservices wount work directly on new version due to changes like form based RESTFul services.

Meaning that the webservices will need to be called by submiting a form to a URL with inputs passed as form input elements.


Underlying jive webservices is apache cxf framework. This is plugged in using spring component.


Follownig configurations are needed to create a webservice in this approach





jaxrs element with id, address and implementing bean reference. This entry along with bean and annotations on bean interface is used to declare a web-service.


Example Spring.xml

<jaxrs:server id="custom-service-name" address="custom-servie-address">


            <ref bean="custom-service-manager-bean" />





Implementing Interface

Bean interface has annotations @GET/@POST/@DELETE and @Path element which has location of the individual method. @PathParam is used to extract elements from path to method parameters. @FormParam can be used to extract data from post.



Differenct between @GET and @Get

Both are used for RESTFul services but @Get from codehus is used when we use both SOAP and REST over same service implementing class.


When to use REST and when to use SOAP

SOAP is a approach of integrating large applicaitons where interface complexity is high. For Jive REST services are sufficient to expose it's functionality in simple and efficient way.

But there are some drawbacks that i fealt (There may be workarounds to these limitations and it will be great if you can provide your valuable comments)

1.  The RESTFul services dont have WSDL files - So in case one know the service address it is hard to find list of available methods, the interface for calling them etc...

2. There is less control while calling webservices while using JSON approach of data transfer. In case we use XML approach, where is the definition of the XML elements?

So in case we would like to modify the payload of xml/json message on the fly it will be difficult since the definition is not well defined like that in SOAP (SOAP WSDL has Schema element)


SOAP should be used when there is a need to consume services from complex applications. The use of SOAP should be minimum since it involves lot of parsing and preprocessing, on the other hand it also has good integration with SOA architecture and easy to integrate with complex systems.