On Tue, Aug 30, 2016 at 2:42 PM, Chamila De Alwis <[email protected]> wrote:

> One hybrid solution would be to have db triggers adding records to a
> single "monitor" table in which a polling inbound endpoint can periodically
> look check for changes [1]. Based on the new records, the consequent
> sequence can decide which actions to execute.
>

Having single table for book-keeping may lead to difficulty to perform
data-mapping and growth of data may also take down the performance.

>
> [1] - http://stackoverflow.com/questions/6153330/can-a-sql-trigger
> -call-a-web-service
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Senior Software Engineer | WSO2
> Blog: https://medium.com/@chamilad
>
>
>
> On Tue, Aug 30, 2016 at 4:52 AM, Srinath Perera <[email protected]> wrote:
>
>> Hi Malaka,
>>
>> If it is done using triggers, it can be done without us doing anything. I
>> assume trigger can hit a URL in the ESB that trigger processing.
>>
>> Adding a DB listener as an inbound endpoint is OK.
>>
>> I suggest we only do DB listener.
>>
>> --Srinath
>>
>> On Tue, Aug 30, 2016 at 3:13 PM, Malaka Silva <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> ​There are requirements to ​do additional operations when there are
>>> changes done to organization data.
>>>
>>> One way to do this is to create triggers at database level. However
>>> there are limitations on actions users can perform using triggers.
>>>
>>> So if we implement custom inbound endpoint we can cover most of the use
>>> cases.
>>> [image: Inline image 1]
>>>
>>>
>>>
>>> There are several ways to do that. But we already know using JDBC is
>>> impossible at the moment. One way to achieve this is implementing a polling
>>> inbound to monitor the changes in the database object (such as a table in
>>> the database). If any change occurred, that inbound can invoke a sequence.
>>> But this is not a good practice. What if your database has more than ten
>>> tables? Then users have to create ten threads for each table and that would
>>> be a great mess regarding to the performance.
>>>
>>> There are also vendor specific solutions provided. [1] [2]
>>>
>>> JPA also provide this capability [3] However with this users need to
>>> create entities for there environment and using those with ESB is complex.
>>>
>>> Using Hibernate we can do the same and maintain the configuration in XML.
>>>
>>> Thoughts about this inbound are welcome?
>>>
>>> [1] http://stackoverflow.com/questions/12618915/how-to-imple
>>> ment-a-db-listener-in-java
>>> [2] http://www.ibm.com/support/knowledgecenter/SSSHYH_5.1.1/
>>> com.ibm.netcoolimpact.doc5.1.1/solution/imsg_db_listeners_da
>>> tabase_listener_overview_c.html
>>> [3] https://docs.jboss.org/hibernate/entitymanager/3.6/reference
>>> /en/html/listeners.html​
>>> [4] https://dunithd.wordpress.com/2009/10/27/create-database-tri
>>> ggers-like-features-using-hibernate-events/
>>>
>>>
>>> Best Regards,
>>>
>>> Malaka Silva
>>> Senior Technical Lead
>>> M: +94 777 219 791
>>> Tel : 94 11 214 5345
>>> Fax :94 11 2145300
>>> Skype : malaka.sampath.silva
>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>> Blog : http://mrmalakasilva.blogspot.com/
>>>
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>> https://wso2.com/signature
>>> http://www.wso2.com/about/team/malaka-silva/
>>> <http://wso2.com/about/team/malaka-silva/>
>>> https://store.wso2.com/store/
>>>
>>> Don't make Trees rare, we should keep them with care
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> ============================
>> Srinath Perera, Ph.D.
>>    http://people.apache.org/~hemapani/
>>    http://srinathsview.blogspot.com/
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
*Vanjikumaran Sivajothy*
Lead Solutions Engineer - *WSO2 Inc. *
Committer and PMC member - Apache Synapse.
*http://wso2.com <http://wso2.com/>*
 *+1-925-464-6816*
[image: Facebook] <https://www.facebook.com/vanjikumaran> [image: Twitter]
<https://twitter.com/vanjikumaran> [image: LinkedIn]
<http://www.linkedin.com/pub/vanjikumaran-sivajothy/25/b31/293> [image:
Blogger] <http://vanjikumaran.blogspot.com/> [image: SlideShare]
<http://www.slideshare.net/vanjikumaran>

This communication may contain privileged or other confidential information
and is intended exclusively for the addressee/s. If you are not the
intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print,
copy, re-transmit, disseminate, or otherwise use the information contained
in this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to