Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Custom DSC instantiation


Level 1

Hi, Adobe LC Forum..

Can anyone explain what the lifecycle of a custom DSC is, and how it's implemented (eg: as an EJB)?

I have a custom DSC that I'd like to have running from the time I start it (eg: using "Start Component" in the Components view in Workbench), until I manually stop it, servicing requests that get invoked via calls to methodes defined in the implementation class.

I'd think this is possible as it appears the other, "out of the box" Services like Forms and Output are implemented as Components as well, so it seems logical that there'd be a defined lifecycle for the DSCs that can be controlled programatically.

When I use my custom DSC today, it appears to instantiate a separate instance of the object on every call to any of the methods defined in the class.  As I'd like to persist data within the object across multiple method invocations, I don't want a separate instance of the object created on every call.  (I plan to use the DSC multiple times within a single Workflow.  On the first call, I want to do some initialization, get a connection object from the JDBC pool, prepare an SQL statement and hold on to it.  On later calls, I just want to do setXX (eg: setString) operations on the PreparedStatement and executeUpdate.  That way, I can optimize my SQL interactions with the database and also trap SQLException and other exceptions that the "out of the box" JDBC Services don't seem to catch).

Hope that makes sense..thanks for any and all help!

- J

1 Reply


Level 2

Configure your component/Service to be a single process for all invocations.

i.e goto admin UI and configure it.