abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Constabaris <a...@clownsinmycoffee.net>
Subject Advice on implementing an APP server
Date Tue, 20 Feb 2007 14:26:17 GMT
I'm working my way through the server example, and I figured while I'm 
working out how to do it, I might as well try to write some 
documentation.  I'm fairly new to this part of the framework, so I'm 
looking to clear some stuff up:

1. Configuration precedence order:
 - hard coded defaults
 - META-INF/services
 - abdera.properties
 - system properties
- (for Abdera Servlet) servlet config parameters

2. As with parsers etc, default (non-abstract) implementations are 
provided for all the factories and workhorse classes used in the server 
framework one needs /except/ ProviderManager and Provider; a minimalist 
working setup requires creating PM and P implementations, plus 
specifying a TargetResolver.

While I'm on (2) (and this is nearer to my immediate concerns, but seems 
like a ripe subject for documentation): suppose my APP server is part of 
an existing application that uses Spring with JPA/Hibernate/JDO/iBatis 
for data access (or just that I really like Spring IoC and I want to use 
it behind my new APP server).  I've got this juicy set of services just 
sitting there, already initialized, and now I need to instantiate a 
ProviderManager and give it access to those things.  I can't use Spring 
to inject those services into the ProviderManager instance, because as 
long as I'm using the stock AbderaServlet, creation of the protocol's 
factory objects is controlled by the Abdera framework.  Since there 
doesn't seem to be a way to access the servlet context (where a 
reference to the Spring context can be held) through the framework 
classes, it looks like the cleanest approach is to subclass 
AbderaServlet, which can inject the Spring-managed dependencies into the 
Abdera factory classes.  Mutatis mutandis if I'm working with 
EJB3/Servlets 2.5 and I want to inject container-managed JPA 
EntityManagers into my Abdera-based classes.

Is the gist of the above paragraph generally supportable, or am I 
missing some cleaner way(s) of doing Spring/EJB3-backed data integration?



View raw message