ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meeraj Kunnumpurath <mkunnumpur...@googlemail.com>
Subject Re: Embedding ODE
Date Thu, 27 May 2010 22:06:35 GMT
Hi Aaron,

Thanks for your kind reply. I have got the scripts to run as part of the
initiation process.

I was wondering whether you could answer the below question for me ..

The simple scheduler relies on JTA transaction synchronization for queuing
the job. This means after I do the invoke on the MEX, I need to commit the
transaction to retrieve the response. Is there an alternative way if I want
the BPEL process to execute in larger transactional context and I don't want
suspend and resume the current transaction?

Kind regards
Meeraj

On Thu, May 27, 2010 at 7:44 PM, Aaron Anderson <aaronanderson@acm.org>wrote:

> Hi Meeraj,
>
> Currently the simple scheduler implementation utilizes JDBC code and not
> JPA so the tables are not auto-created. The SQL script is in the
> dao-hibernate-db module under src\main\sql. If you build the project the
> complete SQL script including both the scheduler and hibernate DDL should be
> generated for each of the supported database vendors.
>
> Regards,
>
> Aaron
>
>
>
>
> ________________________________
> From: Meeraj Kunnumpurath <mkunnumpurath@googlemail.com>
> To: dev@ode.apache.org
> Sent: Thu, May 27, 2010 7:32:29 AM
> Subject: Re: Embedding ODE
>
> I think it is because I didn't start the scheduler. However, when I try to
> start the scheduler, I get a table not found exception (ODE_JOB). If I am
> only using transient processes, do I still need to create the database
> tables. If yes, can I get the DDLs from somewhere?
>
> Regards
> Meeraj
>
> On Thu, May 27, 2010 at 10:56 AM, Meeraj Kunnumpurath <
> mkunnumpurath@googlemail.com> wrote:
>
> > Hi,
> >
> > I have made some progress in being able to invoke an entry point,
> however,
> > in the code below, the get on the future seems to be timing out on line
> 7. I
> > am trying to invoke a transient, synchronous two way process. Is there
> > anything I am missing. I do have an encompassing JTA transaction.
> However, I
> > don't want to commit between the invoke and the get, as the process is
> part
> > of a larger transaction.
> >
> > 01: MyRoleMessageExchange mex = bpelEngine.createMessageExchange(uid,
> > portTypeName, operationName);
> > 02: mex.setProperty("isTwoWay", "true");
> > 03: org.apache.ode.bpel.iapi.Message request = mex.createMessage(new
> > QName("", ""));
> > 04: Element payload =
> > odeMessageFactory.fromJaxb(((Object[])message.getBody())[0],
> operationName);
> > 05: request.setMessage(payload);
> > 06: mex.invoke(request).get();
> > 07: Element response = mex.getResponse().getMessage();
> >
> > Regards
> > Meeraj
> >
> >
> > On Fri, Apr 23, 2010 at 9:45 AM, Milinda Pathirage <
> > milinda.pathirage@gmail.com> wrote:
> >
> >> Both integration layers are same. There can be small differences. You
> need
> >> to implement BindingContext interface, EndpointReferenceContext
> interface
> >> and MessageExchangeContext interface other than the BPEL server manager.
> >>
> >> Thanks
> >> Milinda
> >>
> >> On Fri, Apr 23, 2010 at 12:38 PM, Meeraj Kunnumpurath <
> >> mkunnumpurath@googlemail.com> wrote:
> >>
> >> > Thanks Milinda.
> >> >
> >> > Is the Axis2 integration in the current trunk or the 1.3.3 tag? I have
> >> been
> >> > using the 1.3.3 release version. Is the 2.0-beta release stable to
> use?
> >> >
> >> > Kind regards
> >> > Meeraj
> >> >
> >> > On Fri, Apr 23, 2010 at 3:54 AM, Milinda Pathirage <
> >> > milinda.pathirage@gmail.com> wrote:
> >> >
> >> > > Hi Meeraj,
> >> > >
> >> > > You can have a look at the ODE Axis2 integration layer to understand
> >> how
> >> > > BPEL server is initialized and how you can invoke process through
> ODE
> >> > API.
> >> > > We have separate integration layer implemented for WSO2 BPS using
> the
> >> > > knowledge we get from ODE's Axis2 integration layer.
> >> > >
> >> > > Please first go through the Axis2 integration layer and tell us if
> you
> >> > have
> >> > > any questions.
> >> > >
> >> > > Thanks
> >> > > Milinda
> >> > >
> >> > > On Fri, Apr 23, 2010 at 3:22 AM, Meeraj Kunnumpurath <
> >> > > mkunnumpurath@googlemail.com> wrote:
> >> > >
> >> > > > Hi,
> >> > > >
> >> > > > I have been trying to find my way through, debugging through
the
> >> code.
> >> > So
> >> > > > far, I think, I have managed to initialize a server instance
with
> >> the
> >> > > code
> >> > > > below,
> >> > > >
> >> > > >        TransactionManager transactionManager = new Current();
> >> > > >        BasicDataSource basicDataSource = new BasicDataSource();
> >> > > >
> >> > > >        Properties odeProperties = new Properties();
> >> > > >
> >> > > >        SimpleScheduler scheduler = new SimpleScheduler(new
> >> > > > GUID().toString(), new JdbcDelegate(basicDataSource),
> odeProperties
> >> );
> >> > > >
> >>  scheduler.setExecutorService(Executors.newCachedThreadPool());
> >> > > >        scheduler.setTransactionManager(transactionManager);
> >> > > >
> >> > > >        BpelDAOConnectionFactoryImpl dcf = new
> >> > > > BpelDAOConnectionFactoryImpl(null);
> >> > > >        BpelServerImpl bpelServer = new BpelServerImpl();
> >> > > >        bpelServer.setDaoConnectionFactory(dcf);
> >> > > >        bpelServer.setScheduler(scheduler);
> >> > > >        bpelServer.init();
> >> > > >
> >> > > > Is this the right approach?
> >> > > >
> >> > > > Thanks
> >> > > > Meeraj
> >> > > >
> >> > > > On Thu, Apr 22, 2010 at 8:49 PM, Meeraj Kunnumpurath <
> >> > > > mkunnumpurath@googlemail.com> wrote:
> >> > > >
> >> > > > > Hi,
> >> > > > >
> >> > > > > I am looking at embedding ODE in an SCA container. The objective
> >> is
> >> > to
> >> > > > > enable in-process two way invocation between BPEL processes
and
> >> other
> >> > > > > component types like POJO instances. Quickly looking through
the
> >> > > source,
> >> > > > I
> >> > > > > gather the starting point is BpelServerImpl. Could someone
> please
> >> > tell
> >> > > > what
> >> > > > > is the minimalist requirements to get the server is going?
> >> > > > >
> >> > > > > 1. Is durable persistence always required?
> >> > > > > 2. How do I deploy a BPEL process, if I have a handle to
the
> >> physical
> >> > > > > resource representing the process?
> >> > > > > 3. How do I send a message to a named process and receive
the
> >> return
> >> > > > value?
> >> > > > > 4. Can I register some kind of endpoint reference with a
> >> registered
> >> > > > > process, so that the process can make any outbound calls
through
> >> the
> >> > > > > registered endpoint references?
> >> > > > > 5. What are the lifecycle operations on the BpelServerImpl?
> >> > > > >
> >> > > > > The code I have now is as simple as below,
> >> > > > >
> >> > > > > BpelServerImpl bpelServer = new BpelServerImpl();
> >> > > > > bpelServer.init();
> >> > > > >
> >> > > > > I get the following exception ..
> >> > > > >
> >> > > > > Exception in thread "main" java.lang.NullPointerException:
sscf
> is
> >> > > null!
> >> > > > >     at
> >> > > >
> org.apache.ode.bpel.engine.BpelDatabase.<init>(BpelDatabase.java:43)
> >> > > > >     at
> >> > > > >
> >> >
> org.apache.ode.bpel.engine.BpelServerImpl.init(BpelServerImpl.java:237)
> >> > > > >     at
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.sca4j.bpel.ode.OdeEmbeddedBpelServer.start(OdeEmbeddedBpelServer.java:45)
> >> > > > >     at
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.sca4j.bpel.ode.OdeEmbeddedBpelServer.main(OdeEmbeddedBpelServer.java:54)
> >> > > > >
> >> > > > > Kind regards
> >> > > > > Meeraj
> >> > > > >
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > Milinda Pathirage
> >> > > Senior Software Engineer & Product Manager WSO2 BPS;
> >> http://wso2.org/bps
> >> > > WSO2 Inc.; http://wso2.com
> >> > > E-mail: milinda@wso2.com, milinda.pathirage@gmail.com
> >> > > Web: http://mpathirage.com
> >> > > Blog: http://blog.mpathirage.com
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Milinda Pathirage
> >> Senior Software Engineer & Product Manager WSO2 BPS;
> http://wso2.org/bps
> >> WSO2 <http://wso2.org/bps%0AWSO2> Inc.; http://wso2.com
> >> E-mail: milinda@wso2.com, milinda.pathirage@gmail.com
> >> Web: http://mpathirage.com
> >> Blog: http://blog.mpathirage.com
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message