John Hunt wrote:
Dear All,

I have a question around SCA and Java embedded in a database. How feasible is it to embedded SCA within say the Java VM running within an Oracle database, either to provide a service or as a client to call a service.

I have a scenario in mind that goes essentially like this:

  1. Some database logic (e.g. PL/SQL) calls a piece of Java code
  2. Java code needs to call out to an external service – for example
     to access an external Work Order system to obtain a new work order id
  3. Java code calls an SCA client, using (say) the Web Services
     binding to access the remote service direct from within the database
  4. Obtains a new id back and continues?

Obviously the Database JVM must be able to support the appropriate version of Java etc. but what else might be required.

I think it's an interesting scenario. We could run SCA compositions inside a database server, which would become just another node in an SCA domain.

Nothing else is required, embedding an SCA runtime in your JVM should be easy, you'll just need to do what most of our J2SE samples do to bootstrap an SCA runtime and load it with your composite.


Potentially hosting services is more of an issue – however, in some cases it might be useful to define a Java POJO that will invoke PL/SQL within the database for performance issues (obviously we could create a POJO external to the database that could call the PL/SQL / stored procedures externally).

Yes exactly, the POJO could just perform local calls to the database PL/SQL or stored procedures.

However, I suspect that this is a rather more
problematic area. For example, depending upon the binding selected what functionality is required in the database - how would a web service, rmi or jms binding be supported (if indeed at all).

I don't see any big problems here :) you just need to place the Tuscany binding extension on your classpath, RMI, WS, JMS should just work as-is, as in our J2SE samples, then you just add the desired binding to the service implemented by your POJO, in your composite file. That's all.


In terms of real world scenarios I know of numerous situations in which the SCA client in the database scenario would be very useful. I have less “real world” scenarios for the service in the database example.

But should the ability to at least run an SCA Client from within the database be a supported SCA scenario? I would be very interested to know what the SCA Dev community think about this.

Regards,

John


I think it's a very interesting scenario and we should support it!

Do you want to start working on it? Do you need pointers to the samples that bootstrap the runtime or have you already played with them?

--
Jean-Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to