The web client typically use a servlet filter, ServiceContextServletFilter.
We provide implementations for jboss (JBossServiceContextFactory) and other
servlet containers such as tomcat and jetty
(ServletContainerServiceContextFactory). The servlet filter puts the
ServiceContext object in ServiceContextStore, as a thread local variable.
The action/controller class in the client gets it from ServiceContextStore
and pass it to the service as an ordinary method parameter. The reason for
this is that the service could be remote or not execute in same thread. 

ServiceContextStoreAdvice is placed in front of the service method and picks
the parameter and puts it in ServiceContextStore, for later usage of for
example AuditInterceptor.

The ServiceContext is by default passed as first parameter in business tier
methods. This can be turned off if you don't need auditing or use another
mechanism to create the ServiceContext object.

I'm currently investigating the possibility to create ServiceContext
instance with an interceptor in front of the service methods, and populate
it from jboss jaas context. That would mean that the ctx parameter is not
necessary. That is probably a jboss/ejb specific solution.

One thing strikes me. For web application without ejb, it is enough with the
servlet filter. No parameter and no ServiceContextStoreInterceptor is
needed. 

Yes, we could write some more docu about this. There is some in javadoc of
the classes mentioned above.
Aslo:
http://fornax.itemis.de/confluence/display/fornax/7.+Developer%27s+Guide+%28CSC%29#7.Developer%27sGuide%28CSC%29-RemovingthegenerationoftheServiceContext


Let us know if you need any more clarifications or something to assist your
proof of concept.

/Patrik



greatfooty wrote:
> 
> 
> 
> Andreas Källberg-2 wrote:
>> 
>> Hi,
>> No current support at the moment I'm sad to say.
>> Though, we have it in our backlog, it hasn't been prioritized yet.
>> If you need, we'll pull it from the backlog.
>> 
>> .../Andreas
> 
> Thanks Andreas that'd be good and I'll look forward to it though for now
> I'm keen to get one site created and live using sculptor to prove to a few
> people that its a better approach than that we're presently using.
> 
> Richfaces (RF) is our decreed primary JSF component library so for now I'm
> planning to push on and determine if we're best to A) weave RF pages +
> controllers etc alongside generated sculptor gui OR that we B) use the
> sculptor business tier only and do regular handcrafted RF UI for the
> Presentation Layer.
> 
> In either case we still show the value of sculptor consistent with DDD
> theory and will entrench that approach for longer term benefit.
> 
> One question i'm trying to answer now though is how to configure and use
> the ServiceContextStore (fornax object) within a custom UI such as I've
> described for approach B. It looks like the  Auditable feature relies on
> this and I can see it used by control logic within Action classes to
> retrieve a stored ServiceContext  but how would i need to populate that
> Store if within a handcrafted Richfaces UI. I've scoured the docco but can
> just see a couple of minor refs to the ServiceContext - it would be good
> to elaborate it a bit more for anyone needing populate it where only using
> the sculptor generation for business tier.
> 
> Note also that I'm unfamiliar with SpringWebFlow but as used within the
> sculptor webapps it looks neat and clearly enhances flow control so I
> expect we will use that along with RF.  
> 
> Again thanks for your reply and I'm looking forward to getting more
> familiar with sculptor.
> 

-- 
View this message in context: 
http://old.nabble.com/Sculptor-CRUD-GUI-for-custom-List-methods--tp26156674s17564p26199420.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to