Oscar Changes
Release version: 1.0.5 - May 13, 2005
- Modified the PackageAdmin service to queue subsequent
refresh requests, rather than block them.
- Modified ModuleClassLoader and URLPolicy to support
ClassLoader.getResources(). This also required modification
to the URL handler.
- Made class loading more strict, such that a request for a class or
resource from an imported package now fails immediately if the target
is not found in the exporting bundle; previously, if the target was
not found in the exporting bundle the search would continue to
the importing bundle's local class path.
- Fixed a bug in the StartLevel service implementation where the
the security and parameter value checks for setStartLevel()
were occurring too late. The result was that if any exceptions were
thrown, they were thrown to the StartLevel thread, which
caused it to exit its run() method. The checks were moved
before the caller thread delegates to the StartLevel thread.
- Modifed native library manifest header parsing to not expect
a leading '/' character in the native library name; instead, it
assumes that tokens without a '=' character in them are native library
names.
- Rewrote a previous fix in LDAP filter evaluation that evaluated
subexpressions containing attributes that do not exist to false.
The previous fix did not work in all cases and the new approach
appears to be a little cleaner.
- Improved the error message used when an error occurred while trying
to cache a bundle.
Release version: 1.0.4 - February 18, 2005
- Added bundle install/update support for HTTP proxy authentication
using the http.proxyAuth system property; see the
usage documentation
for more information. These changes were donated by Erik Wistrand.
- Included updated version of OBR, replacing the invalid version of
OBR from the last release.
Release version: 1.0.3 - January 21, 2005
- All synchronous events are now delivered regardless of the
state of the bundle, where asynchronous events are still only
delivered if the bundle is active.
- Modified how the LDAP evaluator evaluates expressions that
reference attributes that do not exist. Previously in such
a scenario the entire expression evaluated to false,
but now only the sub-expression containing the non-existent
attribute evaluates to false and the remainder of
the expression evaluates normally.
- Modified bundle resource URL creation to prefix a "/" to the
resource name if it did not already have one, otherwise the
string representation of the resulting URL would not have a
"/" separating the host from the file.
- Modified service selection algorithm to correctly assign a default
ranking of zero to service references that have no ranking specified.
Release version: 1.0.2 - October 8, 2004
- Fixed an obscure bug that caused a bundle's state to revert to
RESOLVED if it were updated while in the INSTALLED
state and the framework was not refreshed.
- Fixed a bug in calculating the package name of a resource if the
resource started with a "/" character, which would cause
the resource load to fail.
- Fixed a bug in start level processing where persistent start levels
were being reset to the initial start level value upon reactivation.
- Modified BundleContext.getService() and
BundleContext.ungetService() to throw a
NullPointerException when a null reference
is passed in; this change was done to be consistent with
other framework implementations, although it is not clear
from the specification if this is the required behavior.
- Fixed a bug in service registration that led to a
NullPointerException if the class of the registered
service object was loaded by the system class loader.
- Improved and fixed LDAP parser and expression evaluation,
including:
- Added special case support for Boolean as values,
since it does not implement Comparable.
- Added special case support for Character as values,
since it does not implement a constructor that takes
a String.
- Added support for arrays of primitives as values.
- Added support for Vector as values.
- Added support for BigInteger and BigDecimal
as values.
- Fixed bug in approximate comparisons when dealing with
negative numbers.
- Fixed some bugs in the LDAP parser where the left-hand-side
and right-hand-side of filter comparisons were swapped.
- Modified LDAP parser to not use reflection classes for arrays,
since the reflection packages are not available in limited Java
execution profiles.
- Modified example.policy file to make it work better with
the GUI shell bundles and Windows.
- Fixed a small bug with native libraries that resulted in an
unsatisfied link error if you specified a relative path name
for the cache or profile directory.
- Moved exception rethrow in Oscar.updateBundle().
- Moved firing of UPDATED event in Oscar.updateBundle().
- Modified the clean up if an exception is thrown in
BundleActivator.start() to ensure that any actions
performed by the bundle are undone.
- Modified bundle manifest header parsing to throw an exception
if the import, export, or dynamic import values are an empty string.
- Modified Bundle.start() and Bundle.stop() because
exceptions required by the specification were being hidden by
exceptions thrown at higher levels.
- Modified BundleContext.ungetService() return value to
properly return false when the service usage count goes
to zero.
- Removed a couple of references to Java APIs that were introduced
in JDK 1.4 to make it possible to compile Oscar with JDK 1.3.x.
Release version: 1.0.1 - July 1, 2004
- Fixed a bug that was not correctly cleaning up after a bundle
resolve exception occurred; in some situations this could lead
to NoClassDefFoundErrors when the bundle was eventually
resolved and activated.
- Fixed a bug in dynamic package importing that could lead to
NoClassDefFoundErrors when updating a bundle with
dynamic imports.
- Modified the PackageAdmin implementation so that it fires
a PACKAGES_REFRESHED event, even if there are no packages
to refresh.
- Included the latest versions of the Bundle Repository and Shell
Plugin bundles.
Release version: 1.0.0 - June 13, 2004
- Changes to the framework:
- IMPORTANT! The profile cache directory structure has changed
in this version of Oscar; this was necessary to support a change in
bundle update behavior. As a result, old profile cache directories
cannot be used and must be recreated. It is possible to convert your
existing profile directories if you so desire; see the
bundle caching document for details. Also,
bundle-related state information is now saved in plain text so that
it can be easily read and edited.
- IMPORTANT! Building Oscar now requires Ant 1.6.
- Modified bundle update behavior so that it effectively takes place
immediately; i.e., the updated revision of the bundle is executing
after the call to Bundle.update() returns. The old revision
of the bundle is not actually removed at this point, since Oscar must
keep its old packages around until a refresh or shutdown is performed;
thus, any exported packages from older revisions are still exported
until one of these two events occurs, at which time all old revisions
are purged from the bundle cache. If the updated bundle requires newer
versions of packages that are exported by older revisions, then a
resolve exception will be thrown when trying to activate the updated
bundle.
- Modified bundle uninstall behavior so that it effectively takes palce
immediately; i.e., you can install the same bundle immediately after
uninstalling it. Uninstalled bundles are not actually removed until a
refresh or shutdown is performed; thus, any exported packages are
still exported until one of these two events occurs, at which time the
bundle is actually removed from the bundle cache.
- Modified FrameworkListener, BundleListener, and
ServiceListener registration to comply with the
specification. Duplicate FrameworkListener or
BundleListener registrations are ignored, while
duplicate ServiceListener registration resets the
old filter to the new filter. IMPORTANT! This may break
code that previous registered duplicate event listeners.
- Introduced the BundleCache and BundleArchive interfaces
to better abstract how Oscar caches bundles; this new approach makes
Oscar completely separable from its bundle cache. The classes
DefaultBundleCache and DefaultBundleArchive
implement Oscar's default file-based bundle cache. IMPORTANT!
This change resulted in changes to all cache-related configuration
properties, which are now:
- oscar.cache.bufsize - Sets the buffer size to be used by
the cache; the default value is 4096.
- oscar.cache.dir - Sets the cache directory for
DefaultBundleCache instance; defaults to
~/.oscar. This property did not exist in previous
versions of Oscar.
- oscar.cache.profile - Sets the profile name for
the DefaultBundleCache instance; there is no
default for this property. This property was called
oscar.profile.name in previous versions of Oscar.
- oscar.cache.profiledir - Sets the profile directory
for the DefaultBundleCache instance; defaults to
${oscar.cache.dir}/${oscar.cache.profile} (i.e.,
the default profile directory is the name of the profile in
the cache directory). This property was called
oscar.profile.dir in previous versions of Oscar.
If this property is specified, then oscar.cache.dir
and oscar.cache.profile are ignored, since
their only purpose is for creating the profile directory.
See the bundle caching document and the
usage documention for
more information about these properties and how to set them.
- Fixed a long-standing issue that would cause an exception during a
refresh when refreshing a bundle with a native library that was
being refreshed because it was dependent on an updated or deleted
bundle. The exception was due to not being able to re-load the
native library since it was associated with the bundle's old class
loader. The bundle cache now refreshes (i.e, renames)
the bundle directory for all refreshed bundles, which eliminates
the problem of re-loading the native library.
- Modified service registration to use the class loader of the service
object when verifying that the service object is assignable to the
classes and interfaces mentioned in the objectClass property.
Previous versions of Oscar used the class loader of the registering
bundle for the classes and interfaces in objectClass, which
limited the ability of third parties to register services on behalf
of another bundle; section 4.22.8 of the OSGi specification (version 3)
clarifies this situation a little, although it still does not precisely
mentioned where to look for the classes.
- Modified the PackageAdmin service to only return packages that
are actually selected for export, as opposed to also returning packages
that are merely offered for export, per the specification.
- Fixed a bug that caused a bundle's active persistent state to get reset to
inactive when it was refreshed, if the bundle was currently inactive
because its start level was less than the framework's start level.
- Unified property key handling by implementing a CaseInsensitiveMap,
so now both bundle properties and service properties are case insensitive;
previously only bundle properties were case insensitive.
- Implemented ServiceRegistration.setProperties().
- When registering a service, Oscar now makes a copy of the passed
in dictionary to be safe from subsequent modifications.
- Service events are now dispatched synchronously as required by the
specification (version 3); see the next change note for changes
related to this one.
- Modified ServiceReferenceImpl and ServiceRegistrationImpl
to simplify how getService() and ungetService() are
implemented (e.g., they no longer need to scan the service registry) and
to make it possible to get service objects during the service
unregistration process.
- Modified native library meta-data parsing to accept quoted strings
as values for the native library properties.
- Modified dynamic class importing to accept "*" as a valid
import package.
- Simplified, yet again, the concurrency handling aspects of Oscar;
this should be the last time I address this issue, since any further
simplification would be too restrictive.
- Modified LDAP parser to support more operators and to support
property values that implement the Comparable interface,
per the specification; thanks to Humberto Cervantes.
- Modified LDAP expression evaluator to use short-circuited evaluation
for '&' and '|' operators.
- Modified LDAP parser to throw a syntax exception if there are
extra characters after the final closing parenthesis; previously
they were simply ignored.
- Eliminated the possibility to have configuration property files in each
profile directory, since no one was using this feature and a similar
effect can be accomplished with a system property.
- Modified Oscar configuration property handling. If Oscar's constructor
is passed in an instance of Properties, then Oscar will
only use the properties it contains for its configuration. If the
Oscar constructor is not passed in a Properties instance,
then Oscar will use System.getProperty() to find its
configuration properties.
- Fixed a bug in the shell exports command that resulted in
a null pointer exception if the command was executed when there
were stale packages, such as after an uninstall or update.
- Changes to bundles and supporting code:
- Changed some shell command names and syntax. In particular,
the exports command was renamed to packages,
the info command was replaced by the headers
command and its service property retrieval functionality was moved
to the services command. The services command
was also extended to display used services as well as registered
services. Finally, the syntax of the bundlelevel
command was altered to support setting the start level for
multiple bundles at one time.
- Renamed package org.ungoverened.oscar.service to
org.ungoverned.osgi.service; this better separates
the shell and bundle repository service from the framework
implementation. IMPORTANT! This change impacts all
bundles that use any of Oscar's special services, such as
bundles using the shell service to register custom shell
commands. All such bundles must be modified to use the new
package names for service lookup.
- Renamed package org.ungoverned.oscar.bundle to
org.ungoverned.osgi.bundle; this better separates
the example bundles from the framework implementation.
- The bundle repository bundle was nearly completely rewrittern.
The obr command shell has been completely
rewritten to have a more flexible and meaningful syntax.
The bundle repository implementation now uses an XML-based
file, thanks to Didier Donsez.
- Fixed a bug in the shelltui.jar bundle that would
throw an null pointer exception if you typed an EOF character
at the shell prompt.
- Modified the ps shell command to display the version of
the bundle, if present, since this will be useful for the new
obr command that is version-aware.
- Not that anyone cares, but Oscar's installer has been significantly
improved from a design point of view; it kicks some serious butt now.
- Modified the install process to allow the user to select either
a text-based or GUI-based shell.
- Fixed some bugs in the Log Service implementation.
- Renamed the log, telnetd, and xmlrpc bundles by removing the
"openosgi-" prefix.
- Fixed an issue with the HTTP Service where Jetty was trying to
load a registered servlet's class; Jetty does not need to load the
registered servlet's class since it already has an instance.
Release version: 0.9.4a - November 27, 2003
- Fixed, once and for all, a bug that caused problems when refreshing
under Windows due to unclosed embedded JAR files.
- Fixed a typo that was incorrectly initializing the OSGi strictness
flag.
Release version: 0.9.4 - November 14, 2003
Release version: 0.9.4pre2 - September 1, 2003
- Modified ModuleClassLoader to override both loadClass()
and getResource() from ClassLoader. These methods
now delegate to the search policy, which eliminates the need for a
lock on the module manager in order to eliminate some dead lock
situations. Thanks to Rob Walker (robw@ascert.com) for helping to
track down some of these issues.
- Modified ModuleClassLoader to use the class loader that
loaded it as its parent, not the system class loader.
- Modified CompatibilityPolicy to accept import/export
identifiers in addition to import/export version numbers; this was done
to eliminate the assumption that import/export identifiers are always
compared using equals(), now the policy can decide how to
compare identifiers.
- Modified LocalCache to have a modifiable buffer size and to use
buffered input and output streams. The default buffer size is 4096 bytes,
use the system property oscar.cache.bufsize to change this value.
- Modified bundle manifest processing to allow a leading slash ('/') when
specifying embedded JAR files on the bundle class path.
- Fixed a bug introduced in the last release that was always adding the bundle
JAR file to the bundle's class path, even when it wasn't specified.
- Fixed a small bug that occasionally left the System Bundle in the
RESOLVED state instead of the ACTIVE state.
- Fixed a bug in event dispatching that was causing
SynchronousBundleListeners to not receive events.
- Fixed a bug in OscarDispatchQueue that could have led to
problems if two threads fired an event at the same time.
- Moved the URL Handlers service out of the Oscar core and made it
a separate bundle.
- Created a new bundle, called OSGi Utils, that contains
all OSGi interfaces and classes in the org.osgi.util
package; moved ServiceTracker out of the core JAR framework
JAR files and placed them in this bundle. This means that the
ServiceTracker is not available by default and the
OSGi Utils bundle must be installed from obr
to use it.
- Modified processing of system.properties so that it supports
system property variable substitution, just like the bundle.properties
file.
- Modified the ImportSearchPolicy.validated() method to fire
validated events outside of its synchronized block to avoid some
concurrency issues.
- Fixed a small bug that causes the package version number to be printed
incorrectly in the error message that occurred when a bundle could not
be resolved.
Release version: 0.9.4pre1 - June 25, 2003
- This release represents a major re-engineering effort of Oscar.
- The ModuleLoader project is used to handle all
class, resource, and native library loading.
- Concurrency control was majorly re-worked in an effort to
simplify it.
- Reorganized bundle state management by grouping all bundle state
into a single class, called BundleInfo.
- The OSGi interface and class definitions provided by the
OSGi organization are now used.
- Modified the simple bundle example to demonstrate dynamic package
import.
Release version: 0.9.3c - June 16, 2003
- Re-fixed the class loading bug that was supposed to be fixed in
version 0.9.3b; the previous fix introduced another bug
that would result in sporadic class not found expeptions. The bug
was a result of an optimization gone bad, which attempted to short
circuit import/export seaching in BundleClassLoader.findClass().
I am confident that this is the final fix for this bug.
- Updated security policies since they were out-of-date with respect to
the changes introduced with the shell service in version 0.9.1;
this also included adding a privileged action to the shell service itself.
- Fixed some bugs in the LDAP query parser that caused it to not recognize
some operators correctly; also added support for embedded spaces in the
attribute name. These changes where contributed by Dennis Heimbigner.
- Manifest key values are now trimmed when read, so that leading and trailing
spaces are ignored.
- Renamed the HttpService interface method from createDefaultContext()
to createDefaultHttpContext().
- Updated HttpService to use Jetty 4.2.10pre1, which contains some bug
fixes for Jetty.
- The HttpService manifest file now dynamically imports javax.net.ssl.
Release version: 0.9.3b - May 26, 2003
- Fixed a simple class loading bug that arose from a check on
an improperly initialized variable, which could result in spurious
class not found or class cast exceptions; this bug was introduced
in the 0.9.3 release of Oscar.
- Automatically strips leading '/' from bundle resource requests.
- Fixed a security-related bug that was not testing the correct
code base URL for dynamic package import.
- Fixed another security-related bug that caused a null pointer exception
if you tried to retrieve a service without specifying a service
inteface with the security manager enabled.
Release version: 0.9.3a - April 14, 2003
- Minor change to fix a null pointer bug in Service Tracker when
the filter is null.
- Forgot to undo modifications to the simple.jar bundle
while I was testing dynamic package import; these changes are now
undone.
- Simplified DynamicPackageDeclaration class.
- Modified the servlet.jar bundle manifest to export version
2.3.0 of the Servlet API.
Release version: 0.9.3 - April 11, 2003
- Changed Oscar's license to the Apache Software License, although
some bundles remain under the GNU Public License.
- Implemented dynamic package importing; see page 48 in the 3.0 version
of the OSGi specification. This uses a new bundle manifest entry,
called DynamicImport-Package, to allow bundles to dynamically
import packages, which can be useful when classes are passed in via
configuration files (as might be necessary with JDBC drivers). Bundles
using this feature should be prepared to catch
ClassNotFoundExceptions.
- Upon completion of a package refresh, the framework now fires a
FrameworkEvent.PACKAGES_REFRESHED event, per the
OSGi 3.0 specification. Related to this, the
PackageAdmin.refreshPackages() method was modified to
return immediately if a refresh is already in progress. Previously,
the calling thread was blocked until the in-progress refresh was
completed, then another refresh was issued. The specification does
not precisely say how to handle this situation.
- Added an initial implementation of the OSGi 3.0 URL Stream Handlers
service, including example bundles. Contributed by Stephane Chomat.
- Property handling was re-worked for simplicity and consistency;
properties are now dividied into system properties and bundle
properties, each of which are read from separate property
files. Refer to the usage document for
complete details.
- Re-worked the Oscar constructors to eliminate duplicated code
and to use the new system properties.
- The auto-install and auto-start properties can now handle paths
that have spaces; simply place quotes around such paths.
- Fixed a specification compliance issue regarding
BundleContext.getService(). The specification says this method
should return null for a given service if it is unregistered,
but Oscar would previously return non-null if the service object
was in the service usage cache. Oscar now returns null.
- If a security manager is installed, Oscar now checks for permission
to retrieve a service on every call to BundleContext.getService(),
even if the service is already cached. This affects situations where
permissions change dynamically at run time.
- A problem exists when a bundle location is not a URL. In BundleClassLoader,
each loaded class has a CodeSource attached to it so that the Java
security infrastructure can determine from where the class originated. The
code source is based on a valid URL. Previously, if the location of a bundle
was not a valid URL an exception would be thrown. Now, the class loader
tries to generate a fake URL if the bundle location is not an URL. The fake
URL is generated like this:
"location://" + bundle.getLocation()
This is not a general solution, since the result may still be an malformed
URL, but it at least makes more cases successful and it also makes it
easy to grant permissions to such bundles in security policy files. In
the future, maybe a better algorithm for generating predictable fake
URLs will be introduced.
- Fixed a specification compliance issue for parsing native library
manifest entries; now you can have multiple libraries in one attribute,
but each library must begin with a "/" character, e.g.:
Bundle-NativeCode: /lib/libfoo.so;/lib/libbar.so;osname=Linux;processor=x86,
/lib/foo.dll;/lib/bar.dll;osname=WinXP;processor=x86
- Created a new oscar-svc.jar bundle that contains all of
the OSGi service API classes; this is mostly useful for bundle
developers since osgi.jar does not include the service
API classes.
- Added API documentation to OSGi service classes, but this work was for
naught since OSGi now includes source code for the standard classes.
- Fixed a small bug in SystemBundle where it was not properly
exporting its framework packages due to a cut-and-paste bug in the array
initialization.
- Fixed two bugs in the ServiceTracker that caused it to
essentially always return null when retrieving services;
not that it matters, everyone should be using the
Service Binder
anyway. ;^)
- Fixed a bug in circular import package resolution that did not always
clean up its state in the case of a failure.
- Modified the obr command to display the help message when
no parameters are specified, to use all tokens for matching when
performing a query, and to only show bundle names in the query results.
- The tablelayout.jar bundle is now included in the Oscar
core; it was mistakenly left out since it is required by the
Oscar GUI shell.
- Property names for LDAP filters can now have "-" and "_" characters
in them.
- Updated the HTTP Service to use the JDK1.2 targetted version of Jetty;
thus, the HTTP Service should work on JVMs greater than or equal to
version 1.2.
- Removed some bundles from the release package that were related to
my Gravity research project and modified the bundle documentation
accordingly; these bundles will be made available with Gravity when
it is officially released.
- Added links to some third-party bundles in the bundle documentation;
these bundles are also available via the Oscar Bundle Repository.
Release version: 0.9.2 - November 26, 2002
- Implemented a simple bundle repository service that allows you to
download the example bundles directly off the Oscar Web page;
this service automatically resolves bundle package dependencies.
A shell command for use with Oscar's shell service is also provided;
at the Oscar shell prompt, type "obr -help" for details.
- Modified the Oscar release package as a result of the bundle
repository mentioned above. The pre-built package of all bundles
is no longer available; pre-built bundles should be downloaded
"a la carte" from the bundle repository.
- Removed the Gravity bundle from the release package, which eliminates
dependencies on XML and JDK 1.4; Gravity will be available
separately.
- Modified the LocalCache implementation to cache JAR
file object to improve performance; contributed by Rob Walker.
- Modified Oscar property handling to perform property substituion
on properties in the oscar.properties file; if a property
value includes a property name denoted with ${..}, the
value of this property will be substituted for the property name.
The value will be taken from either the system properties or from
Oscar's properties. Contributed by Rob Walker.
- Added info shell command to display bundle properties.
- Modified the ps shell command to show the name of the
bundle if present; added a -l to show the location.
- Modified the System Bundle so that it now only exports the
packages org.osgi.framework, org.osgi.util.tracker,
org.osgi.service.packageadmin. All other service-related
packages should be exported by their implementors or put
into library bundles. This will allow bundles to supply
newer versions of the packages, which was not possible
previously since System Bundle packages were automatically
selected and resolved when the framework started.
- The System Bundle now displays its exports using the exports
command (via the PackageAdmin service).
- Updated the HttpService implementation to be more compliant with
the specification and to work with the latest version of Jetty;
contributed by Rob Walker.
- Updated HttpAdmin stylesheets to work properly with new HttpService
implementation; contributed by Rob Walker.
- The last release of Oscar moved processing of auto-install and auto-start
properties out of Oscar.java and into Main.java; the processing is now
moved back to Oscar.java so that they will be processed automatically
whether Oscar is embedded or not.
- Added SynchronousBundleListener interface and modified
event dispatching to process such listeners according to the
specification.
- Modified event dispatching to ensure that events are not delivered
to bundles that are not active or starting; the specification says
that events should not be delivered to bundles that are not active,
but it does not explicitly say Bundle.ACTIVE. I think it
makes more sense to deliver to both Bundle.ACTIVE and
Bundle.STARTING bundles, otherwise it would be impossible
to create a complete list of services in BundleActivator.start(),
for example. This may change once I have verified the intention of
the specification.
- Fixed a bug that could result in an infinite loop in some cases
of circular package dependencies.
- BundleClassLoader.getExportedResource() was not correctly
calculating the package name for resources, this is now fixed.
- Modified getServiceReferences() to not return services
from bundles that are stopping; this is not really specified in
the OSGi specification, but seems to make sense.
- Fixed an obscure bug in the Filter implementation that was
caused when an exception was thrown in the underlying LDAP evaluator;
the operand stack was not being emptied.
- Forgot to update Oscar version number, it is now updated.
Release version: 0.9.1 - October 2, 2002
- Added new GUI shell for Oscar (includes command history); this is
related to the new shell service described below. To use the new
GUI shell, refer to the usage.html
document
- Defined and implemented org.ungoverned.oscar.shell.ShellService;
this new service acts as the basis for all shell functionality for
Oscar. The shell.jar and shelltui.jar bundles
must be listed in Oscar's oscar.auto.start property in
order for the default command shell to be created at start-up;
this is the default case. A major benefit of this approach is that
it is now possible for bundles implement
custom shell commands.
- Re-implemented the text shell as a bundle (shelltui.jar)
that uses the new shell service. For the most part, the shell works
exactly the same as before, the only difference is that you can no
longer install and start a bundle by simply typing a URL at the
prompt. Instead, to install and start a bundle in one step, use the
start command with a URL.
- Oscar now relies more heavily on its property file (by default
the property file is lib/oscar.properties). A default
version of this file is included to maintain the same user experience
as previous versions of Oscar, the only visible difference is
that you now must start Oscar from the install directory.
This change results from the fact that the property file uses relative
path names to specify the URLs to the new shell service and shell
text UI bundles. You may edit the property file to include absolute
paths if you wish to run Oscar from directories other than the
install directory. More details about these changes are described
below.
- Besides the shell-related bundles, added these new bundles:
- Gravity - a prototype application framework built on top of OSGi
(other various new bundles for Gravity were also introduced).
- ServiceBinder - a prototype of a system for automatically
binding/unbinding services for a bundle.
- HttpAdmin - a simple HTTP administration servlet for Oscar.
- Eliminated all Oscar command-line parameters; all configuration
options for Oscar are now handled exclusively via
"-D<prop>=<value>" settings
when executing the "java" command. The properties
that Oscar uses are:
- oscar.property.file - to specify the file from
which Oscar reads its configuration properties; this file is a
standard Java properties file and by default is located in
the same directory as oscar.jar and is called
oscar.properties. All of the following properties
can be specified in this file instead of specifying them
on the command-line.
- oscar.strict.osgi - to specify that Oscar should
run in "strict" OSGi compliance mode. The possible values are
"true" or any other value; the default value is
"true". Currently, there are only two features that are
not strict OSGi: the automatic serialization/deserialization of
BundleActivators if they implement Serializable
and interpreting the bundle manifest export package property such
that it recursively include sub-packages, rather than requiring
that each sub-package be specified separately.
- oscar.profile.name - to specify the default profile
name to avoid the interactive profile prompt.
- oscar.auto.install - to specify a space delimited
list of bundle URLs to automatically install every time Oscar is
started; if the bundles are already installed, then this has
no affect.
- oscar.auto.start - to specify a space delimited
list of bundle URLs to automatically install and start every time
Oscar is started; if the bundles are already installed and
active, then this has no affect.
- Modified processing of oscar.auto.start shell property to
perform two passes of the auto-start bundles, one to install and
one to start; this avoids start-up order problems.
- Implemented a work-around for a JVM limitation (Sun does not think
it is a bug). The limitation resulted in an error when you try to
update a bundle that uses native libraries. The error occurs because
native libraries are considered unique with respect to their absolute
path name and because Sun's JVM enforces a one-to-one mapping between
native libraries and class loaders. This causes a problem when you
update a bundle with native libraries, because the updated bundle
gets a new class loader and is unable to reload the native library
since its name is not unique and is associated with a different
class loader. The solution uses a simple counter variable in each
bundle cache directory to generate a unique library directory name
each time a bundle is updated; this tricks the JVM into thinking that
it is loading a different library. This is mostly a hack for
bundle development, since the result is that multiple version of the
native library will be left in memory.
- Added support for circular import package dependencies; in previous
versions of Oscar, circular dependencies caused a stack overflow.
- Fixed a bug that could result in an infinite loop if a bundle
imports the same package that it exports.
- Fixed a performance issue that appeared when searching for classes
from a bundle that exports a lot of packages.
- Added a simple patch to the HTTP service so that it unregisters
aliases.
- Modified HTTP service in an attempt to fix problems associated
with registering resources.
- Added documentation for the shell service and updated other
documentation where necessary.
Release version: 0.9.0 - May 2, 2002
- The Oscar release package has been divided into pieces since the
release package was growing considerably. Note: You only need to
download the core oscar package, because the installer allows you to
download the optional packages if you want them.
- Modified the installer to be able to install from a URL and cleaned
it up a bit to make it more extensible.
- Added security permission checking; this is a major change and
many other changes are a direct result of this change. See
security.html for more information;
feedback is encouraged.
- Added bundles to demonstrate new security features, see
security.html for more information.
- All source files are now in the src subdirectory.
- The implementation of the HttpService has been improved
by Rob Walker (robw@softsell.com).
- Included additional bundles for the OSGi LogService,
a telnet service, and an XML RPC service; many thanks to
Rob Walker (robw@softsell.com) and his company.
- Added org.osgi.framework.Constants;
org.ungoverned.oscar.Constants is now a subclass.
- Added org.osgi.framework.AdminPermission.
- Added org.osgi.framework.PackagePermission.
- Added org.osgi.framework.ServicePermission.
- Calling stop() on the System Bundle now shuts down
Oscar, per the OSGi specification.
- Fixed a bug in ServiceTracker.waitForService() that caused
it to not wait indefinitely if the timeout was zero.
- Modified BundleClassLoader to be a subclass of
SecureClassLoader and to associate code sources
to classes when they are loaded.
- Modified BundleClassLoader to only load exported
classes if the packages are exact matches, rather than "starts with"
matches.
- Improved the logic in BundleClassLoader to eliminate the need
for caching of classes, thus reducing memory usage.
- Oscar now assigns a service identifier to registered services per
the OSGi specification; this identifier is used to select a single
service when multiple services matched a query.
- Fixed a bug in Oscar.getBundle(long id) that would incorrectly
return the last valid bundle if an invalid identifier were passed in;
I can't believe no one noticed this before!
- Moved event listener wrappers from Oscar.java to the util
package and put them all in separate files.
- The system bundle now exports numerous packages and includes an
Export-Package property indicating the which packages are exported,
per the specification.
- Oscar now adds a property Constants.OSCAR_VERSION_PROPERTY
who's value is the version of Oscar; OscarShell now as a
version command to access this property.
- OscarShell now accepts two arguments:
- -nonstrict - to specify that Oscar should run in "nonstrict"
OSGi compliance mode; currently, there are only two non-strict features:
the automatic serialization/deserialization of BundleActivators
if they implement Serializable and allowing the bundle manifest
export package property to include sub-packages, rather than specifying
each sub-package separately.
- -profile <name> - to specify the profile name and avoid
the interactive profile prompt.
- -prop <property-file> - to specify where the
oscar.properties file is located.
- The services command in OscarShell now ignores bundles that
have been uninstalled; this avoids an exception.
- Substantial changes to the installer.
- Various method renaming for better readability.
Release version: 0.8.0 - February 4, 2002
- Modified BundleContextImpl.getServiceReference() so that it
returns the "best" service reference as defined by the OSGi
specification.
- Modified the Messenger example bundle to user ServiceTracker.
- Initial implementation of org.osgi.util.tracker.ServiceTracker
utility class; it has not been thoroughly tested, so I would
appreciate some feedback.
- Modified BundleContext.getServiceReference() and
BundleContext.getServiceReferences() to accept null
for the clazz parameter; the specification is not totally
clear on this, but it was necessary for ServiceTracker.
- Removed the StorageSystem file system abstraction layer
since it is not possible to completely abstract the file system and
because of the performance hit it imposed.
- You can now start Oscar by simply typing from the install
directory:
You can run Oscar from any directory using the above mechanism
simply by specifying the absolute path to oscar.jar. The
run.* scripts now use this method.
- The BundleContext.getDataFile() method now works.
- Modified Oscar.getServiceReferences() to ignore uninstalled
bundles, which otherwise caused InvalidStateExceptions.
- Installer now uses java.home as default for Java directory
and user.home for the install directory.
- OscarShell now accepts a profile name parameter, which
when supplied eliminates the profile name query.
- Added an exports command to OscarShell, which lists
all exported packages; also renamed the shell command printenv
to services to make it more consistent.
- Modified OscarShell to catch all exception when interacting
with the framework; it is now less likely that the shell will exit
due to an exception.
- The debug command in OscarShell was accidentally
renamed to m_debug; this is now fixed.
- Updated LDAP to create in-fix string representation of query for the
FilterImpl.toString() method; these updates were intended
for version 0.7.6.
- Modified PackageAdminImpl.getExportedPackages() to accept
a null parameter, which lists all exported packages.
- Fixed a bug in ExportedPackageImpl, which was inadvertently
using !isRemovalPending() instead of isRemovalPending.
- Modifed ExportedPackageImpl.getImportingBundles() to
include the exporting bundle in its return array.
- Modified HeadersDictionary in BundleImpl to make
a copy of all manifest header information and convert keys/values to
Strings; previously keys were of type Attributes.Name
and this caused problems when manifest header keys were accessed
directly.
- Added a debug flag to build.xml.
- Added some JavaDoc comments to some files and also now include the
OSGi packages when creating the JavaDoc API documentation.
Release version: 0.7.6 - January 5, 2002
- Implemented org.osgi.framework.Filter per the
OSGi 2.0 specification; added corresponding createFilter()
method to BundleContext. Modified existing code to use
Filter implementation instead of LDAP evaluator directly.
- The LDAP parser now allows the "." character in key names;
thanks to Rob Walker (robw@softsell.com) for contributing this.
- Temporarily hacked System Bundle to export the
org.osgi.framework package for bundles conforming
to OSGi 2.0; thanks to Rob Walker (robw@softsell.com) for
contributing this.
- Modified the start-up process to automatically update
bundles if the previous session did not perform a
"refresh"; this was not being done previously.
- Modified the Oscar constructors slightly to use List objects
rather than ArrayList objects.
- Fixed a bug in the bundle update procedure.
- Fixed a bug in native library loading for bundles.
Release version: 0.7.2 - November 24, 2001
- Fixed a major bug in the "eager resolving" routine that was not actually
doing any eager resolving. Oops.
- Fixed a bug in the refresh packages routine that was not correctly
handling the refreshing of an uninstalled package.
- All event delivery is now asynchronous; this will change to reflect
proper OSGi 2.0 event handling in a future release.
Release version: 0.7.0 - November 21, 2001
- Added PackageAdmin service implementation from the 2.0
specification; this service is used to refresh exported packages
after a bundle is updated or uninstalled.
- Added a "refresh" command to OscarShell that uses the
new PackageAdmin service to refresh exported packages after
a bundle is updated or uninstalled.
- The actual process of deleting an uninstalled bundles is now delayed
until a "refresh" occurs or until the framework shuts down.
- Modified Oscar's constructors with respect to registering service
objects when using an embedded instance of Oscar. Previously, a list
of ServiceRecord objects were passed into Oscar's constructor,
but this has been changed to be a list of BundleActivator
objects.
- Oscar's approach to concurrency control was modified to specifically
support multi-bundle state change operations, such as what is required
to refresh exported packages in multiple bundles.
- Removed all file handling via File objects from Oscar and
introduced a simple virtual storage layer using the StorageSystem
and related interfaces; this may prove to be inefficient.
- Merged most bundle functionality into the BundleImpl class.
- Modified Oscar's container bundle to comply with the "system bundle"
notion in the 2.0 specification.
- The handling of package exporting/importing was modified to provide
more consistent package binding across all bundles.
- Exported packages are now only available after a bundle is resolved
per the specification. Oscar still delays resolving bundles, but "eager
resolving" of bundles is performed if an installed bundle exports a
package needed by another bundle that is being activated.
- Added a simple design document in the doc/ directory.
- Many smaller fixes, additions, and changes that are too numerous
to mention.
Third release version: 0.6.0 - July 1, 2001
- Implemented support for packaging native libraries in bundle JAR files.
- Modified the simple example bundle to include a native
library for Linux PC platforms; eventually a Windows DLL will be included
as well.
- Removed dependency on javax.swing.event.EventListenerList in
the core framework. Completely re-implemented event dispatching by
creating a DispatchQueue.
- Adjusted some architectural issues that complicated bundle handling,
synchronization, and event handling.
- Minimized some synchronized blocks that were too broad and could lead
to deadlock in the face of multiple threads.
- Added a very, very preliminary HTTP service bundle implementation
built on top of a slightly modified version of
Jetty. This implementation
only functions enough to register a servlet and display its contents.
Refer to the bundle documentation for more information.
- Modified getServiceReferences() method to actually use the
query filter that is passed in; previously this was just ignored.
- Fixed a bug that was causing some event listeners to not get removed.
- Other slight architectural and cosmetic changes to clean up the code.
Second release version: 0.5.0 - May 20, 2001
Preliminary release version: 0.3.0 - March 14, 2001
Feel freel to contact me at
heavy@ungoverned.org.
Richard S. Hall