directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Horne <>
Subject Re: Standalone & Webapp Examples not working with 1.5.6
Date Fri, 26 Mar 2010 10:57:57 GMT
Hi Stefan,

Thanks for the response - I'll give it a shot.  

Re. the factory... FWIW I sometimes think that code gets "over patterned".  I only use the
factory pattern when I have a realistic expectation that the implementation of an interface
is likely to be done in another way (ie. a socket implementation and an RMI implementation
of a remote service).  If not, then good old constructors with a reasonable set of defaults
and overloaded with various parameters make life easier.  Less objects is always better unless
there is a need for them.  In the same way that the core schema is read only and in the jar
resource path, you can do the same with default properties read in constructors. Which leads
me to... 

My app is a layered OSGI app and I want to embed ApacheDS in an OSGI bundle.  I've noticed
some text about OSGI on the website - is that very far advanced?  If not, I'm happy to help
out... I'm not a big fan of Spring (I also think you can get "over frameworked") in the OSGI
space and so the config of ApacheDS looks like a prime candidate for some refactoring to use
the osgi config management facility at the same time it is registered as a service.  Is there
any interest for some help in that space?


On 26/03/2010, at 4:46 PM, Stefan Zoerner wrote:

> Hi Peter!
> Peter Horne wrote:
>> Thanks for the replies and I'll look forward to the updates.  One place where you
may want to start is with installer/apacheds-noarch.  As I was trying to work out what was
wrong with my code, I thought I'd get it (installer/apacheds-noarch) going and then make some
exploratory changes.  It worked fine after a maven build and running the script.
 However when I removed arg[0] from the script (target/plan/server.xml) to make it use the
defaults, it crashed with the same exception that my code had... Exception in thread "main"
java.lang.NullPointerException 	at
>> 	at
>> 	at
> This is the same error I ran into when I tried to update the example for the custom partition
example found here:
> Problem was the way I created the DirectoryService. The SchemaManager was missing afterwards.
> Currently I do the following
> ...
> DirectoryServiceFactory factory = DefaultDirectoryServiceFactory.DEFAULT;
> factory.init("default");
> DirectoryService directoryService = factory.getDirectoryService();
> ...
> which works. There is a discussion on our dev-list about whether this is the intended
and most easiest way to accomplish the task programmaticaly.
> Feel free to join the discussion. Sorry for the inconvenience.
> Greetings from Bielefeld,
>    StefanZ

View raw message