On Thu, Apr 25, 2013 at 8:20 PM, Kurt T Stam <[email protected]> wrote:

> On 4/25/13 10:20 AM, Subash Chaturanga wrote:
>
>> Please note: the tricky part is I need to do both my stuff(inserting to
>> uddi registry  and inserting to X ) during the particular juddi call.
>> (relevant JAXWS call for service insertion).
>>
>> ** So consider as when adding a service to uddi, my service insertion to
>> X should happen before insertion to uddi registry. Appreciate any one
>> possible solution for me to achieve this.
>>
>
Hi Kurt,


>  1. Before you go down the Interceptor path I guess the question is why
> you can't call into system X before calling into jUDDI from your client
> code.
>
> Because it is not actually my client code calling to JUDDI, rather some
system Y . In my case this Y is  an ESB (OSB).  So "Y" calls to my system's
JUDDI server and inserts to the service to UDDI registry. In the same
service call I want to call X web service. Hence in that sense, I believe
my suggestion of JPA interceptor is correct.


> 2. If you really need to call into system X from a JPA interceptor, then
> you should try find an example program demonstrating interceptors to learn
> about how an interceptor works. Are you planning on using hibernate or
> openjpa?


In fact, I am using juddi 3.x and it uses openjpa. Why JPA interceptor
needed is because juddi insertions takes place through JPA calls .Those
JAXWS services juddi provides has those JPA calls to do insertions to uddi
data base. It is a bit hard to find proper example for JPA Interceptors in
OpenJPA. That's why I drop a mail to juddi to check whether juddi have a
mechanism to achieve my requirement without going to JPA level.



Maybe you start here: http://docs.jboss.org/**hibernate/entitymanager/3.5/**
> reference/en/html/listeners.**html<http://docs.jboss.org/hibernate/entitymanager/3.5/reference/en/html/listeners.html>,
> and look into the @PrePersist annotation ( which I think you can also set
> in the persistence.xml)
> Once you got that to work we can help you with which classes you would
> want to add interceptor to.
>
> 3. If you make a good case for why you need this interception business,
> then we might also be able to add hooks right into the service layer; i.e.
> you'd be able to configure an endpoint and receive a call with the
> serialized XML on every SaveService call.
>
> --Kurt
>
>
>


-- 
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog -  http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89

Reply via email to