Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [orbit-dev] Questions about Apache BSF

The current approach shown below has two issues.  First it is using Require-Bundle.  If someone decides to supply scripting support for say python, they may use a different bundle name.  The second is of course that *you* have to know all scripting languages ahead of time.

 

This is a common problem with extensible infrastructure.  Two main approaches that I can suggest.

-          Use a buddy loading policy that gets you the things you need

-          Write some extensibility code that will help BSF find the classes that it needs. 

 

Unfortunately, both of these then require the contributed bundle to register somehow (well , do something) with BSF.  That is better but still less than optimal. 

 

As a first cut I am thinking that you can include as many Require-Bundles as you think reasonable but then also add a “registered” buddy loading policy statement to leave open the possibility of other bundles showing up with scripting support.

 

BTW, how does BSF access and instantiate the scripting engines?

 

Jeff

 

From: orbit-dev-bounces@xxxxxxxxxxx [mailto:orbit-dev-bounces@xxxxxxxxxxx] On Behalf Of Michael A Squillace
Sent: Tuesday, April 22, 2008 5:21 PM
To: orbit-dev@xxxxxxxxxxx
Subject: [orbit-dev] Questions about Apache BSF

 


All:
I recently discovered a few problems with the plugin manifest for my recently bundled org.apache.bsf. First, BSF requires org.apache.commons.logging so added that requirement. More importantly, though, running BSF will require different plugins depending upon the scripting language of interest. For instance, in ACTF, we use _javascript_ so I require org.mozilla._javascript_ with the resolution:=optional flag. What about other languages supported by BSF (e.g. JACL, jython, netrex)? Here's what the Require-Bundle property looks like thus far:

Require-Bundle: org.apache.commons.logging,
 org.mozilla._javascript_;resolution:=optional,
 org.python.pydev;resolution:=optional,
 net.redrobin.eclipse.jydt.core;resolution:=optional

Open to suggestions on how to handle other languages and what other languages to include.

--> Mike Squillace
IBM Human Ability and Accessibility Center
Austin, TX

W:512.823.7423
M:512.970.0066

masquill@xxxxxxxxxx
www.ibm.com/able


Back to the top