Wednesday, July 9, 2008

Partial solution to TCCL problem in OSGi

One of perennial problem that OSGi uses asked from mailing lists is to resolved the problem of TCCL. As I have mentioned in the blog post "OSGi and TCCL dilemma", there is no proper definition is available in OSGi R4.1 specification for TCCL.

On the other hand Eclipse Equinox OSGi implementation has taken steps to prevent this problem with the invent of ContextFinder (CF). When the framework starts, Equinox sets the framework TCCL to CF. Hence, all the bundles spawn from this framework will set its TCCL to CF. CF finds classes and resources from the classloader associate with the current method of the execution stack. (java.lang.SecurityManager#getClassContext). This is not the complete answer to the problem, but it will solve most of the common scenarios. Thus, it's very easy to use this concept and apply to other OSGi implementations as well, such as Apache Felix.

WSO2 is align with producing products that are OSGi enabled. The underline infrastructure of these products uses a product called "Carbon", which is an OSGi wrapper powered with either Eclipse Equinox or Apache Felix and provide a
Web Services infrastructure powered by Apache Axis2. Carbon uses the "servletbridge" design principle to bridge OSGi and Servlet container. Hence, Carbon is one such infrastructure that harness the benefits of server-side OSGi. Though Carbon defaults to Equinox and Felix OSGi implementations, it has give a very powerful API to integrate other OSGi implementations as well.

You will be able to find the source code from "svn co".

Nice thing about Carbon is that it can switch between Equinox or Felix based on users preference. It can switched to any other OSGi implementations that is registered with too. Carbon uses the prior mentioned ContextFinder principle to solve the TCCL problem and I think it's a very fair assumption until OSGi specification mandate on the TCCL.

One of the very first product that is scheduled to be released on this month on top of the prior mentioned infrastructure is "Data Services Solution", which is a complete solution for data services via web services.


Mirko said...

Well, I am with you, saying that TCCL are a problem in the context of OSGi. However, I don't think it is an issue of the OSGi spec. The spec tries to define a component model and in its nature, it doesn't know anything about the context, each bundle is used. The approach Carbon and actually more Equinox is promoting is a good solution for adopting OSGi as a first step, but I think it is more important to rethink the design of the libraries to get rid of the need for TCCLs or at least have a mechanism to set them in a meaningful way. Neither the component, nor the container should know about it. Only the application, but that's just my opinion of course ;-)

Saminda Abeyruwan said...

You are right. OSGi spec doesn't mandate on TCCL and it's a grey area. When we try to convert the existing jars as bundles to be used in an OSGi environment, we face the problem of not being able to change the code to obtain classes and resources from that classes classloader. Most probably this is due to licences and it's quite error prone to change an production code. So IMHO in order to OSGi to be dominant in server side, it first needs to interoperate with existing stuff. So having notion of a context to a bundle will be handy in a long term scenario.

Rajesh Girish said...

Hi, I'm facing few problems when i followed the OSGI pdf documents for check out the source codes and build using maven,when i build " i'm getting few errors

"The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.axiom.attachments; version="0.0.0"

how to resolve this.. please inform me ASAP .Advanced thanks for any help.

Ice said...

Hey, really nice post! Wish u a nice day!
best and newest cheap shoes online at a fraction of the cost.

Nargis Satti said...

Cool article, that is interesting that columns have been around us in every day life and we put them in our designs thinking we are creative.

Unknown said...

Last year's wins at the Turkish Airlines Open and WGC-HSBC Champions have world No 3 Ryder Cup 2018 Live Free Justin Rose in second spot, with Race to Dubai champion Tommy Fleetwood lurking just behind in third thanks to a runner-up finish at Shinnecock Hills.

jishan said...

The World Series 2018 will be the championship series of Major League Baseball's 2018 season.
The 114th edition of the World Series will be played between the American League champion versus the National League champion and will begin on Tuesday,
October 23. A potential Game 7 is scheduled to be played on October 31.[2] The Series will be televised nationally by Fox. For the second year in a row,
the World Series will be sponsored by YouTube TV and officially will be known as the 2018 World Series presented by YouTube TV.[3]

sk shohan said...

ICYMI - free nba 2k18 locker codes Prelude release is live and as a reminder, that means fans can now download the demo on PS4 and Xbox One, but unfortunately, PC and Nintendo Switch users miss out.

The Prelude allows users to download a demo, which is around 11.76 GB in size, which gives players access to the new social space known as the neighbourhood as well as a head start on to the Prelude a full week before NBA 2K18 arrives and get a head start on their MyPLAYER career.

The MyPLAYER career will also carry over for anyone who buys the full game, which is out next week, September 15th for pre-order customers, or September 19, 2017 when it goes on sale at retail

sk shohan said...

Breeders Cup 2018 Live Stream switch' Cup in Louisville will be supplemented continuously yearly Equestricon tradition, celebration and public expo at the Kentucky International Convention Center in downtown Louisville.



Most costly home deals in Jefferson County in September (PHOTOS)


Open paychecks: These are Louisville's most generously compensated authorities


Salute to Veterans

Nov. 6

That occasion, which permits horse hustling fans to rub shoulders with significant players in the game, will be featured by a Triple Crown trophy display and signature session for recently resigned Triple Crown victor Justify on Tuesday, Oct. 30. Amid that occasions, visitors will have an opportunity to meet the now-amazing Thoroughbred's proprietors, coach Bob Baffert and move Mike Smith.

nh mhu said...

Wimbledon authorities have chosen the match will Melbourne Cup 2018 Live Stream recommence at 1pm neighborhood time (10pm Saturday night AEST), only a hour prior to the booked beginning of the ladies' last between Serena Williams and Angelique Kerber. That implies, should the rest of Nadal and Djokovic's match last longer than 60 minutes — which, according to what they dished up today, is an undeniable probability — at that point the ladies' last will be postponed.

NFR Live Stream 2018 | Watch CBS Sports Online said...

Hello there, You have done an incredible job. I will certainly digg it and personally recommend to my friends. I am sure they will be benefited from this site.

Sports Videos, Highlights

Sports Videos, Highlights

Unknown said...

Football is a leader among the other kinds of sporting activities, so it’s no wonder it has become one of the most popular searches on the Internet. You don’t have to search a lot to find a website to soccer streams reddit
. Here you will get access to all information in real time, including prognostics, results, statistics of the game, etc. Live football streaming is a great opportunity to watch your favourite games online absolutely free.

todaypklive said...

Georgia Bulldogs college football 2019 live

Georgia Bulldogs college football 2019 live.The Georgia Bulldogs football program speaks to the University of Georgia in the game of American football. The Bulldogs contend in the Football Bowl Subdivision (FBS) of the National Collegiate Athletic Association (NCAA) and the Eastern Division of the Southeastern Conference (SEC). They play their home amusements at noteworthy Sanford Stadium on the college's Athens, Georgia, grounds. Georgia's debut season was in 1892. UGA claims two agreement national titles (1942 and 1980); the AP and Coaches Polls have each casted a ballot the Bulldogs the national victor once (1980); Georgia has likewise been named the National Champion by at any rate one surveying specialist in three different seasons (1927, 1946 and 1968).[3] The Bulldogs have won 16 gathering titles, including 13 SEC titles (tied for second-most record-breaking), and have showed up in 55 bowl diversions, tied for second-most record-breaking. The program has likewise created two Heisman Trophy champs, four number-one National Football League (NFL) draft picks, and numerous victors of other national honors. The group is known for its storied history, exceptional customs, and out of control fan base, known as the "Bulldog Nation". Georgia has prevailed upon 800 diversions in their history, putting them eleventh unsurpassed in wins.

Unknown said...

Notre Dame season opener against Louisville Cardinals will mark the first Thursday night season opener Memorial Stadium history. Saturday night Notre Dame Football Live watch online NCAA Football Game tv. All kind of information was relesied recently. The teams met in a 49-21 Clemson victory in Atlanta last season, as Clemson’s 49 points were the most scored by the school all-time at Grant Field in Atlanta since the field’s opening in 1913. It will be the first game ever to be broadcast on the soon-to-be-launched ACC Network.