About knopflerfish OSGi Framework

who knows this framework can supports which VMs?

who knows this framework can supports which VMs?According to the OSGi Alliance the OSGi Framework supports the following:
"The L0 Execution environment is the specification of the Java environment. Java 2 Configurations and Profiles, like J2SE, CDC, CLDC, MIDP etc. are all valid execution environments. The OSGi has also standardized an execution environment based on Foundation Profile and a smaller version that specifies the minimum requirements on an execution environment to be useful for OSGi bundles."
I don't know if Knopflerfish has any restraints on VM's, but I think not, since their goal is to support as many possible devices, et cetera.
Hope this helps.
Regards,
Eelco Kurvers

Similar Messages

  • About Devsphere Mapping Framework ?

    Discuss about this framework ?

    who knows this framework can supports which VMs?According to the OSGi Alliance the OSGi Framework supports the following:
    "The L0 Execution environment is the specification of the Java environment. Java 2 Configurations and Profiles, like J2SE, CDC, CLDC, MIDP etc. are all valid execution environments. The OSGi has also standardized an execution environment based on Foundation Profile and a smaller version that specifies the minimum requirements on an execution environment to be useful for OSGi bundles."
    I don't know if Knopflerfish has any restraints on VM's, but I think not, since their goal is to support as many possible devices, et cetera.
    Hope this helps.
    Regards,
    Eelco Kurvers

  • Org.osgi.framework.BundleException when Running the script

    Hi when ever i run the test script. in console i can see the org.osgi.framework.BundleException. it looks like as below, please help on it, can anyone tell me the cause and how fix this?
    org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Another singleton version selected: org.eclipse.osgi_3.4.3.R34x_v20081215-ospatch120211
         at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
         at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
         at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
         at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.startBundles(ConfigApplier.java:317)
         at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:86)
         at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:124)
         at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:138)
         at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
         at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
         at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
         at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355)
         at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074)
         at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616)
         at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
         at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299)
         at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(StartLevelManager.java:247)
         at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(SystemBundle.java:201)
         at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:644)
         at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.java:51)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:313)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
         at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
         at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

    Issue got solved, by remove the file "org.eclipse.osgi_3.4.3.R34x_v20081215-ospatch120211" from "C:\OracleATS\openScript\plugins".
    there are some duplicated jars (with more than one version)

  • Cant startup OSGI Framework

    I have been trying to use BIRT APIs. I downloaded and pasted the demo code on the eclipse. But I am getting the same error with every code saying that "cant strtup OSGI framework".
    I have used code from : https://wiki.eclipse.org/Java_-_Simple_Design_Engine_API_(BIRT) .
    And the error is like::
    org.eclipse.birt.core.exception.BirtException: Cant startup the OSGI framework
    at org.eclipse.birt.core.framework.Platform.startup(Platform.java:91)
    at api1.example1.buildReport(example1.java:76)
    at api1.example1.main(example1.java:45)
    Caused by: org.eclipse.birt.core.exception.CoreException
    at org.eclipse.birt.core.framework.osgi.OSGILauncher.startup(OSGILauncher.java:90)
    at org.eclipse.birt.core.framework.Platform.startup(Platform.java:79)
    ... 2 more
    Exception in thread "main" java.lang.NullPointerException
    at api1.example1.buildReport(example1.java:86)
    at api1.example1.main(example1.java:45)
    Thanks in advance

    Did you make sure to change the BIRT_HOME in the code to point to the location where you have extracted the BIRT Runtime in your environment?

  • Some questions about iOS system framework, APNS and so on

    Hi everyone!
    im quite interested in iPhone developement.by reading some dev books of iOS i can learn the general steps of creating an iPhone app. however, i cant find much of iPhone's system archetecture or framework information on the internet, so sometimes i was confused by the running process and principle of an app. so, im wondering cannnnnnn u guuuuuuuuuys doooooooo meeeee a little favor by answering the following questions and i appreciate that:
    1. can u recommend some articles or sites from which i can take a look at the system framework of iOS?
    2.'backgrounder' is an application for jailbroken iPhone to run an app in the background, i.e. multitasking. do u know what's the principle of 'backgrounder'? can u offer some links that i can get more information of 'backgrounder'?
    3,the function of Multitasking, as Apple mentioned in the release of iOS 4, brought another word 'APNS', i.e. apple push notification service. i googled APNS and learned that the servers are provided by Apple and perhaps the servers are located in the U.S. so im wondering, if im using PUSH message, does that mean each PUSH message gotta travel between my country and America twice? if it's true, its gotta cost a lot and there'll be huge delay! and since APNS are maintained by Apple, is it correct to say that Apple can read every PUSH message? and the last question, there're lotta companies providing PUSH messages, and is Apple able to handle all the PUSH flow? that's really great burden i think!
    im a college student and an iPhone rookie, and people around me dont know too much about Apple and iPhone, so i have to ask professionals like u for help. ur reply can really help me a lot and im looking for ur reply eagerly. sorry for my poor english and THX a million.

    A good place to ask question regarding the Actor Framework is in the community:
    https://decibel.ni.com/content/groups/actor-framework-2011
    And yes I have used and is using the Actor Framework.

  • New, open source JavaFX OSGI framework

    First, a disclaimer: this is an open source project I started, and somebody may regard it as advertising (basically, it is ). I'm not sure if it's against forum rules. If so, please delete this thread.
    Basically, it's a framework for developing modular applications based on OSGI. It should provide support for building applications for desktop, web and mobile devices. It's called DEMUX Framework. Published under Apache License.
    http://demux.vektorsoft.com
    So far, support is available for desktop applications based on JavaFX, and mobile apps for Android. Since this is JavaFX forum, I would like some feedback from people who work with JavaFX. Basically, is this something you would find useful and worth spending time developing?
    If you have some time to throw away, give it a try. Please note that this is early stage development, so you will probably get frustrated and annoyed, buty ou should get the general idea.
    Documentation and some code samples are available on project wiki: http://demux.vektorsoft.com/wiki
    Source code for samples is available as part of binary download: https://bitbucket.org/vektorsoft/demux/downloads
    Any feedback is welcome.

    hi,
    here's a thought stop spamming this forum with your crap....
    A warning to others ignore any links this guy offers, 4/5 of his links so far are connected to spyware.
    David.

  • Question about Composite Application Framework CE Expose Service as WS

    hi
    here is my question
    i try NetWeaver CE with document "Service Composition with SAP Composite Application Framework Capabilities In SAP NetWeaver CE 7.1_0_.pdf"
    but i cannot expose Application Service's query as Web Service like page 42.
    the Library page said that because it's because the method ganna return muti-...
    i wanna use caf of netweaver ce just like i used with caf of netweaver 7.0
    What alternatives are there? if i have to get a list to display on VC.
    thank you and good day.

    it can use in EhP1

  • The problem about Java media framework

    Excuse me, How to use Real Time Protocol Vedio with web camera?
    My program can use MIC, but can't found camera?
    Please Help me

    Hi,
    You can try a package named: JTwain, which is available at http://asprise.com/product/jtwain.
    JTwain supports all kinds of digital cameras and scanners. You can use Java to access, contorl digital cameras and scanners, and of course, to acquire images with flexible settings.
    The developers' guide is available @ http://asprise.com/product/jtwain/devGuide.php
    In the simplest case, one line of Java code can solve your problem.
    Good luck!

  • Java, VTK and OSGi

    Hi everyone,
    I am currently working on a Java application based on OSGi (http://www.osgi.org), the dynamic modules framework for Java applications. For this application, I have to create an OSGi bundle embedding VTK, the Visualization ToolKit (http://www.vtk.org), written in C++.
    I have written an article about my adventures and the related issues I have encountered so far: http://dev.artenum.com/blog/ben/posts/osgivtk_andmacosx
    The short story is that by default, the compilation configuration of VTK does not create and link properly the dynamic libraries. I thus had to modify 3 things:
    - change the .dylib extensions to .jnilib
    - prepend the @loader_path prefix to the library transitive dependencies
    - remove the version numbers from the library file names and dependencies.
    This way, I managed to execute the bundle without an UnsatisfiedLinkError. I however have a new problem, that seem much more complex to me.
    When the bundle starts, it creates a "vtkPanel", which extends the AWT Canvas. The rendering on the panel is then performed by a native method call that crashes.
    WARNING in native method: JNI call made with exception pending
    at vtk.vtkPanel.RenderCreate(Native Method)
    at vtk.vtkPanel.Render(vtkPanel.java:166)
    - locked <1060ffa88> (a vtk.vtkPanel)
    at vtk.vtkPanel.paint(vtkPanel.java:189)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
    at sun.awt.RepaintArea.paint(RepaintArea.java:241)
    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
    at java.awt.Component.dispatchEventImpl(Component.java:4790)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    FATAL ERROR in native method: Bad global or local ref passed to JNI
    at vtk.vtkPanel.RenderCreate(Native Method)
    at vtk.vtkPanel.Render(vtkPanel.java:166)
    - locked <1060ffa88> (a vtk.vtkPanel)
    at vtk.vtkPanel.paint(vtkPanel.java:189)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
    at sun.awt.RepaintArea.paint(RepaintArea.java:241)
    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
    at java.awt.Component.dispatchEventImpl(Component.java:4790)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Invalid memory access of location 0x0 rip=0x1010af1f4
    ./ben.sh: line 11: 23453 Abort trap java -Xcheck:jni -jar org.eclipse.osgi_3.6.0.v20100517.jar -console
    This native method crashes when calling the jawt.h method GetDrawingSurfaceInfo(ds);
    Have someone already experienced this kind of problem?
    What is strange is that it works properly if my application is pure Java, but crashes when packaged in an OSGi bundle.
    Any clue is welcome
    Benoît
    Message was edited by: neopium

    Hi everyone,
    I found the solution (to be accurate, someone in Felix mailing list did).
    The problem comes from the way OSGi bundle classloader manages packages visibility. The native method requires apple.awt.ComponentModel to work properly. But the apple.awt package was not declared in the bundle Import-Package tag, so when the native code is called, it does not find it.
    There are two ways to solve the problem:
    - In Felix/Equinox configuration settings, add the "org.osgi.framework.bootdelegation=apple.*" property. This tells OSGi that all apple.* packages are visible to all bundles. This works, but you somewhat lose the modularity of OSGi, as everyone sees those packages.
    - Explicitly import the package in the bundle manifest Import-Package entry. For OSGi to resolve this dependency, you can either:
    * add org.osgi.framework.system.packages.extra=apple.awt in Felix/Equinox configuration settings (your configuration is however now platform-dependent)
    * create a system bundle fragment that exports apple.awt (and contains no other files than the manifest)
    Hope this helps someone.
    It did help me
    I will update my article as soon as possible

  • Compiling a osgi bundle related java file

    Hi,
    i am working on OSGi technology.i have downloaded the Java Embedded Server .i am able to run the framework & run the sample bundles(jar files which r already given).But few other examples r also given where the .java file & manifest files r present.i need to create the jar file & install.i am facing the problem with compilation of Activator.java (filename).the package org.osgi.framework(related interface used in program).i have imported all the required pkges.& also include the framework.jar in the classpath
    (8 errors)
    errrors:cannot resolve symbol
    symbol :class BundleActivator
    import org.osgi.framework.BundleActivator
    similarly for " " .BundleContext
    similarly for " " .BundleException
    Plz let me know the solution.
    Regards,
    Tony

    Apparently the org.osgi.framework package isn't accessible. Check the installation instructions, and read this documentation about classpath and finding classes:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html

  • JPA EntityManager shared across OSGi modules

    Hi,
    I'd like to create an OSGi module which would act as a 'JPA master' making JPA EntityManager available to other OSGi modules. The persistence.xml would be part of this module but it would do nothing more.
    I'd like to then access EntityManager from other OSGi bundles, both JARs and WARs (JAR Bundles and WAR Bundles).
    I'm running on GlassFish 3.1.2.2 and using EclipseLink as the JPA provider.
    Any idea for best practices?
    Thank you

    Hi, thanks for the link.
    It says 'Refer to the examples to see it being used.' without a link so I read the section above that (8. JPA in OSGi Application)
    It says about some config entries in GlassFish, I enabled it but still no luck.
    Here's my /src/main/resources/META-INF/persistence.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
    <persistence-unit name="cmsdbconnection">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
         <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    <property name="javax.persistence.jdbc.url" value="jdbc:mysql://172.16.145.139:3306/test_db"/>
    <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
    <property name="javax.persistence.jdbc.user" value="db_user"/>
    <property name="javax.persistence.jdbc.password" value="db_user"/>
    <property name="eclipselink.ddl-generation.table-creation-suffix" value="engine=InnoDB" />
    <property name="eclipselink.ddl-generation" value="create-tables" />
    <property name="eclipselink.target-server" value="=SunAS9" />
    </properties>
    </persistence-unit>
    </persistence>
    Maven pom.xml to generate MANIFEST.MF:
    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.4</version>
                        <extensions>true</extensions>
                        <configuration>
                             <archive>
                                  <manifestEntries>
                                       <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
                                       <Bundle-SymbolicName>com.ifp.vault.service.persistence</Bundle-SymbolicName>
                                       <Bundle-Version>${project.version}</Bundle-Version>
                                       <Import-Package>org.osgi.framework,org.osgi.util.tracker,javax.persistence;jpa="2.0";version="1.1.0",org.eclipse.persistence.jpa</Import-Package>
                                       <JPA-PersistenceUnits>cmsdbconnection</JPA-PersistenceUnits>
                                       <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
                                  </manifestEntries>
                             </archive>
                        </configuration>
                   </plugin>
    Deploying in GlassFish succeeds, but I cannot obtain the EntityManagerFactory from other OSGi bundles.
    Should that be registered as an OSGi service anyway? Because I can't see that when listing all OSGi bundles.

  • How to start and run osgi.jar and bundles into it programmatically

    I want to launch and run osgi.jar programmatically(at runtime) from a simple java program.
    Then load and run a osgi bundle into the osgi framework from the same program
    Could anyone help me in this regard
    thanks in advance

    I want to launch and run osgi.jar programmatically(at
    runtime) from a simple java program. I have no idea what osgi.jar is... if you want to execute it, find the main-class and simply call its main() method.
    Then load and run a osgi bundle into the osgi
    framework from the same program No idea what you're talking about. Read the documentation or call their support.

  • Redesigning the Collections Framework

    Hi!
    I'm sort of an experienced Java programmer, in the sense that I program regularly in Java. However, I am not experienced enough to understand the small design specifics of the Collections Framework (or other parts of Javas standard library).
    There's been a number of minor things that bugged me about the framework, and all these minor things added up to a big annoyance, after which I've decided to (try to) design and implement my own framework.
    The thing is however, that since I don't understand many design specifics about the Collection Framework and the individual collection implementations, I risk coming up short with my own.
    (And if you are still reading this, then I thank you for your time, because already now I know that this entry is going to be long. : ) )
    Since I'm doing my Collection framework nearly from scratch, I don't have to worry too much about the issue of backwards compatibility (altough I should consider making some parts similar to the collection framework as it is today, and provide a wrapper that implements the original collection interfaces).
    I also have certain options of optimizing several of the collections, but then again, there may be very specific design issues concerning performance and usability that the developers of the framework (or other more experienced Java progammers) knew about, that I don't know.
    So I'm going to share all of my thoughts here. I hope this will start an interesting discussion : )
    (I'm also not going to make a fuss about the source code of my progress. I will happily share it with anyone who is interested. It is probably even neccessary in order for others to understand how I've intended to solve my annoyances (or understand what these annoyances were in the first place). ).
    (I've read the "Java Collections API Design FAQ", btw).
    Below, I'm going to go through all of the things that I've thought about, and what I've decided to do.
    1.
    The Collections class is a class that consists only of static utility methods.
    Several of them return wrapper classes. However the majority of them work on collections implementing the List interface.
    So why weren't they built into the List interface (same goes for methods working only with the Collection interface only, etc)? Several of them can even be implemented more efficiently. For example calling rotate for a LinkedList.
    If the LinkedList is circular, using a sentry node connecting the head and tail, rotate is done simply by relocating the sentry node (rotating with one element would require one single operation). The Collections class makes several calls to the reverse method instead (because it lacks access to the internal workings of a LinkedList).
    If it were done this way, the Collections class would be much smaller, and contain mostly methods that return wrapped classes.
    After thinking about it a while, I think I can answer this question myself. The List interface would become rather bloated, and would force an implementation of methods that the user may not need.
    At any rate, I intend to try to do some sort of clean-up. Exactly how, is something I'm still thinking about. Maybe two versions of List interfaces (one "light", and the other advanced), or maybe making the internal fields package private and generally more accessible to other package members, so that methods in other classes can do some optimizations with the additional information.
    2.
    At one point, I realized that the PriorityQueue didn't support increase\decrease key operations. Of course, elements would need to know where in the backing data structure it was located, and this is implementation specific. However, I was rather dissapointed that this wasn't supported somehow, so i figured out a way to support this anyway, and implemented it.
    Basically, I've wrapped the elements in a class that contains this info, and if the element would want to increase its key, it would call a method on the wrapping class it was contained in. It worked fine.
    It may cause some overhead, but at least I don't have to re-implement such a datastructure and fiddle around so much with the element-classes just because I want to try something with a PriorityQueue.
    I can do the same thing to implement a reusable BinomialHeap, FibonacciHeap, and other datastructures, that usually require that the elements contain some implementation-specific fields and methods.
    And this would all become part of the framework.
    3.
    This one is difficult ot explain.
    It basically revolves around the first question in the "Java Collections API Design FAQ".
    It has always bothered me that the Collection interface contained methods, that "maybe" would be implemented.
    To me it didn't make sense. The Collection should only contain methods that are general for all Collections, such as the contains method. All methods that request, and manipulate the Collection, belonged in other interfaces.
    However, I also realized that the whole smart thing about the current Collection interface, is that you can transfer elements from one Collection to another, without needing to know what type of Collection you were transferring from\to.
    But I still felt it violated "something" out there, even if it was in the name of convenience. If this convenience was to be provided, it should be done by making a separate wrapper interface with the purpose of grouping the various Collection types together.
    If you don't know what I'm trying to say then you might have to see the interfaces I've made.
    And while I as at it, I also fiddled with the various method names.
    For example, add( int index, E element), I felt it should be insert( int index, E element). This type of minor things caused a lot of confusion for me back then, so I cared enough about this to change it to somthing I thought more appropriate. But I have no idea how appropriate my approach may seem to others. : )
    4.
    I see an iterator as something that iterates through a collection, and nothing else.
    Therefor, it bothered me that the Iterator interface had an optional remove method.
    I myself have never needed it, so maybe I just don't know how to appreciate it. How much is it used? If its heavily used, I guess I'm going to have to include it somehow.
    5.
    A LinkedList doesnt' support random access. But true random access is when you access randomly relative to the first index.
    Iterating from the first to the last with a for statement isn't really random access, but it still causes bad performance in the current LinkedList implementation. One would have to use the ListIterator to achieve this.
    But even here, if you want a ListIterator that starts in the middle of the list, you still need to traverse the list to reach that point.
    So I've come up with LinkedList that remembers the last accessed element using the basic methods get, set, remove etc, and can use it to access elements relatively from it.
    Basically, there is now an special interal "ListIterator" that is used to access elements when the basic methods are used. This gives way for several improvements (although that may depend how you look at it).
    It introduces some overhead in the form of if-else statemenets, but otherwise, I'm hoping that it will generally outperform the current LinkedList class (when using lists with a large nr of elements).
    6.
    I've also played around with the ArrayList class.
    I've implemented it in a way, that is something like a random-access Deque. This has made it possible to improvement certain methods, like inserting an element\Collection at some index.
    Instead of always shifting subsequent element to the right, elements can be shifted left as well. That means that inserting at index 0 only requires a single operation, instead of k * the length of the list.
    Again, this intrduces some overhead with if-else statements, but is still better in many cases (again, the List must be large for this to pay off).
    7.
    I'm also trying to do a hybrid between an ArrayList and a Linked list, hopefully allowing mostly constant insertion, but constant true random access as well. It requires more than twice the memory, since it is backed by both an ArrayList and a LinkedList.
    The overhead introduced , and the fact that worst case random access is no better than that of a pure LinkedList (which occurs when elelements are inserted at the same index many times, and you then try to access these elements), may make this class infeasible.
    It was mostly the first three points that pushed my over the edge, and made me throw myself at this project.
    You're free to comment as much as you like.
    If no real discussion starts, thats ok.
    Its not like I'm not having fun with this thing on my own : )
    I've started from scratch several times because of design problems discovered too late, so if you request to see some of the source code, it is still in the works and I would have to scurry off and add a lot of java-comments as well, to explain code.
    Great. Thanks!

    This sort of reply has great value : )
    Some of them show me that I need to take some other things into consideration. Some of them however, aren't resolved yet, some because I'm probably misunderstanding some of your arguments.
    Here goes:
    1.
    a)
    Are you saying that they're were made static, and therefor were implemented in a utility class? Isn't it the other way around? Suppose that I did put them into the List interface, that would mean they don't need to be static anymore, right?
    b)
    A bloated List interface is a problem. Many of them will however have a default not-so-alwyas-efficient implementation in a abstract base class.
    Many of the list-algorithms dump sequential lists in an array, execute the algorithm, and dump the finished list back into a sequential list.
    I believe that there are several of them where one of the "dumps" can be avoided.
    And even if other algorithms would effectively just be moved around, it wouldn't neccesarily be in the name of performance (some of them cannot really be done better), but in the name of consistency\convenience.
    Regarding convenience, I'm getting the message that some may think it more convenient to have these "extra" methods grouped in a utility class. That can be arranged.
    But when it comes to consistency with method names (which conacerns usability as well), I felt it is something else entirely.
    For example take the two methods fill and replaceAll in the Collections class. They both set specific elements (or all of them) to some value. So they're both related to the set method, but use method names that are very distinguished. For me it make sense to have a method called setAll(...), and overload it. And since the List interface has a set method, I would very much like to group all these related methods together.
    Can you follow my idea?
    And well, the Collections class would become smaller. If you ask me, it's rather bloated right now, and supports a huge mixed bag of related and unrelated utitlity methods. If we should take this to the extreme, then The Collections class and the Arrays class should be merged.
    No, right? That would be hell : )
    2,
    At a first glance, your route might do the trick. But there's several things here that aren't right
    a)
    In order to delete an object, you need to know where it is. The only remove method supported by PriorityQueue actually does a linear search. Increase and decrease operations are supposed to be log(n). Doing a linear search would ruin that.
    You need a method something like removeAt( int i), where i would be the index in the backing array (assuming you're using an array). The elemeny itself would need to know that int, meaning that it needs an internal int field, even though this field only is required due to the internal workings of PriorityQueue. Every time you want to insert some element, you need to add a field, that really has nothing to with that element from an object-oriented view.
    b)
    Even if you had such a remove method, using it to increase\decrease key would use up to twice the operations neccesary.
    Increasing a key, for example, only requires you to float the element up the heap. You don't need to remove it first, which would require an additional log(n) operations.
    3.
    I've read the link before, and I agree with them. But I feel that there are other ways to avoid an insane nr of interfaces. I also think I know why I arrive at other design choices.
    The Collection interface as it is now, is smart because it can covers a wide range of collection types with add and remove methods. This is useful because you can exchange elements between collections without knowing the type of the collection.
    The drawback is of course that not all collection are, e.g modifiable.
    What I think the problem is, is that the Collection interface is trying to be two things at once.
    On one side, it wants to be the base interface. But on the other side, it wants to cast a wide net over all the collection types.
    So what I've done is make a Collection interface that is infact a true base interface, only supporting methods that all collection types have in common.
    Then I have a separate interface that tries to support methods for exchanging elements between collections of unknown type.
    There isn't neccesarily any performance benefit (actually, it may even introduces some overhead), but in certainly is easier to grasp, for me at least, since it is more logically grouped.
    I know, that I'm basically challenging the design choices of Java programmers that have much more experience than me. Hell, they probably already even have considered and rejected what I'm considering now. In that case, I defend myself by mentioning that it isn't described as a possiblity in the FAQ : )
    4.
    This point is actually related to point 3., becausue if I want the Collection interface to only support common methods, then I can't have an Iterator with a remove method.
    But okay....I need to support it somehow. No way around it .
    5. 6. & 7.
    The message I'm getting here, is that if I implement these changes to LinkedList and ArrayList, then they aren't really LinkedList and ArrayList anymore.
    And finally, why do that, when I'm going to do a class that (hopefully) can simulate both anyway?
    I hadn't thought of the names as being the problem.
    My line of thought was, that okay, you have this arraylist that performs lousy insertion and removal, and so you avoid it.
    But occasionally, you need it (don't ask me how often this type of situation arises. Rarely?), and so you would appreciate it if performed "ok". It would still be linear, but would often perform much better (in extreme cases it would be in constant time).
    But these improvements would almost certainly change the way one would use LinkedList and ArrayList, and I guess that requires different names for them.
    Great input. That I wouldn't have thought of. Thanks.
    There is however some comments I should comment:
    "And what happens if something is suibsequently inserted or removed between that element and the one you want?"
    Then it would perform just like one would expect from a LinkedList. However if that index were closer to the last indexed position, it would be faster. As it is now, LinkedList only chooses either the first index or the last to start the traversal from.
    If you're working with a small number of elements, then this is definitely not worth it.
    "It sounds to me like this (the hybrid list) is what you really want and indeed all you really need."
    You may be right. I felt that since the hybrid list would use twice as much memory, it would not always be the best choice.
    I going to think about that one. Thanks.

  • Osgi workflowprocess gives classnotfound exception when osgi bundle is activated

    I did create an osgi service that extends workflowprocess interrface using eclipse. I install the bundle that contains this service and then deploy and activate the bundle in day cq. However, on activation I receive an error stating that my class is not found. Please note that both this service and the referenced service(twitterservice that I created) gets registered and the bundle is activated, however, its unable to find the class SendMessageProcessAction on the activation of the bundle. Hope someone could assist.
    POST /system/console/bundles/246 HTTP/1.1] com.day.twitter.workflow [com.day.twitter.service.impl.SendMessageProcessAction] Error during instantiation of the implementation object (java.lang.ClassNotFoundException: com.day.twitter.service.impl.SendMessageProcessAction not found by com.day.twitter.workflow [246]) java.lang.ClassNotFoundException: com.day.twitter.service.impl.SendMessageProcessAction not found by com.day.twitter.workflow [246]
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787 )
        at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    package com.day.twitter.service.impl;
    import javax.jcr.RepositoryException;
    import javax.jcr.Session;
    import org.apache.felix.scr.annotations.Component;
    import org.apache.felix.scr.annotations.Properties;
    import org.apache.felix.scr.annotations.Property;
    import org.apache.felix.scr.annotations.Reference;
    import org.apache.felix.scr.annotations.Service;
    import org.osgi.framework.Constants;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import com.day.cq.workflow.WorkflowException;
    import com.day.cq.workflow.WorkflowSession;
    import com.day.cq.workflow.exec.WorkItem;
    import com.day.cq.workflow.exec.WorkflowData;
    import com.day.cq.workflow.exec.WorkflowProcess;
    import com.day.cq.workflow.metadata.MetaDataMap;
    import com.day.twitter.service.SendMessageProcess;
    import com.day.twitter.service.TwitterService;
    @Component
    @Service
    @Properties({
        @Property(name = Constants.SERVICE_DESCRIPTION, value = " An example of Social Publish Implementation"),
        @Property(name = Constants.SERVICE_VENDOR, value = "RIM POC"),
        @Property(name = "process.label", value = "RIM POC Social Publish")
    public class SendMessageProcessAction implements WorkflowProcess{
        @Reference
        private TwitterService twitterService; 
        public TwitterService getTwitterService() {
            return twitterService;
        public void setTwitterService(TwitterService twitterService) {
            this.twitterService = twitterService;
         * @scr.reference
        private static final String TYPE_JCR_PATH = "JCR_PATH";
        private final Logger logger = LoggerFactory.getLogger(this.getClass()
                .getName());
        private final Logger logger1 = LoggerFactory.getLogger(SendMessageProcessAction.class);
        public void execute(WorkItem workItem, WorkflowSession workflowSession,MetaDataMap args)
        throws WorkflowException {
            final Session session = workflowSession.getSession();
            final WorkflowData data = workItem.getWorkflowData();
            logger.info("TEST VIBHOR!!");
            logger1.info("TEST VIBHOR BHATIA!!");
            String path = null;
            String type = data.getPayloadType();
            if (type.equals(TYPE_JCR_PATH) && data.getPayload() != null) {
                String payloadData = (String) data.getPayload();
                try {
                    if (session.itemExists(payloadData)) {
                        path = payloadData;
                } catch (RepositoryException e) {
                    // TODO Auto-generated catch block
                    logger.error("Exception - Check repository for Payload data path");
                    e.printStackTrace();
            logger.info("arguments");
            String msg = "CQ5 workflow event";
                // is there a message?
            String argument = args.get("PROCESS_ARGS", "default value");
            boolean equal = argument.equals("argument1");
            if(equal){
                String recipient = argument.toString();
                 sendDirectMessageOnTwitter(recipient, msg, path);
            } else {
                logger
                        .error("for sending a DM on Twitter (make sure Twitter allows you to DM that account): dm,(recipient id)");   
               //  return "Check config - error";
        private void sendDirectMessageOnTwitter(String recipient, String msg, String path) {
            getTwitterService().sendDirectMessage(recipient, msg + ", path: " + path);

    <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>2.0.1</version>
            <extensions>true</extensions>
            <configuration>
              <instructions>
                <Bundle-Name>cq-core bundle</Bundle-Name>
                <Export-Package>twitter4j.*</Export-Package>
                <Import-Package>
                      !twitter4j.internal.http.alternative,
                      !org.slf4j.impl,com.day.*,*
                 </Import-Package>
                 <Private-Package>com.day.twitter</Private-Package>  
              </instructions>
            </configuration>
    </plugin>
    Bnd-LastModified: 1334862237167
    Build-Jdk: 1.6.0_21
    Built-By: bvibor
    Bundle-ManifestVersion: 2
    Bundle-Name: cq-core bundle
    Bundle-SymbolicName: com.day.twitter.workflow
    Bundle-Version: 1.0.0
    Created-By: Apache Maven Bundle Plugin
    Export-Package: twitter4j.internal.util, twitter4j.internal.http; uses:="twitter4j, twitter4j.internal.logging, twitter4j.internal.util, twitter4j.http, twitter4j.conf, javax.xml.parsers, twitter4j.internal.org.json, org.w3c.dom, org.xml.sax", twitter4j; uses:="twitter4j.internal.org.json, twitter4j.internal.http, twitter4j.api, twitter4j.http, twitter4j.internal.async, twitter4j.conf, twitter4j.internal.logging", twitter4j.internal.org.json, twitter4j.api; uses:=twitter4j, twitter4j.http; uses:="twitter4j.internal.http, twitter4j, twitter4j.conf, javax.crypto.spec, javax.crypto, twitter4j.internal.logging", twitter4j.internal.async, twitter4j.conf; uses:="twitter4j.internal.http, twitter4j.http, twitter4j.internal.async, twitter4j", twitter4j.internal.logging; uses:="org.apache.commons.logging, org.apache.log4j, org.slf4j, twitter4j.conf", twitter4j.util; uses:="twitter4j.internal.http, twitter4j, twitter4j.internal.org.json, twitter4j.http"
    Ignore-Package: org.slf4j.impl, twitter4j.internal.http.alternative
    Import-Package: javax.crypto, javax.crypto.spec, javax.xml.parsers, org.apache.commons.logging, org.apache.log4j, org.osgi.framework; version="1.4", org.slf4j; version="1.5", org.w3c.dom, org.xml.sax, twitter4j, twitter4j.api, twitter4j.conf, twitter4j.http, twitter4j.internal.async, twitter4j.internal.http, twitter4j.internal.logging, twitter4j.internal.org.json, twitter4j.internal.util, twitter4j.util
    Manifest-Version: 1.0
    Service-Component: OSGI-INF/components.xml
    Tool: Bnd-0.0.357

  • Can I make dreamweaver to create a php framework?

    Hi,
    I don't know where to post this so pardon me for being a noob. What I want to know is that can I make dreamweaver create a framework for php? What I mean to say is that I want that dreamweaver should output the Connections file in php mysql database to framework/database folder and not the default folder. I tried searching the web for a tutorial but I did not find anything.
    Since, dreamwever server behaviours is a boon to web designers and developers alike as it cut downs the hand coding part, I want that dreamweaver should follow a framework folder structure which I can define.
    Any help will be appreciated.
    Thanks.
    Gaurav

    jon@cmiwebstudio wrote:
    it would be nice to see adobe include a php framework in DWCS5 (zend), although I'm not sure about the legal details of that.
    There would be no legal problems including the Zend Framework in Dreamweaver CS5. I spoke to a representative of Zend at Adobe MAX at the beginning of this month, and asked specifically about including Zend Framework files in something I'm planning to do. He said there would be no problem, because the framework is released under the BSD licence.
    However, from a Dreamweaver point of view, including any framework would be problematic. Let's say Adobe chooses the Zend framework. What happens to people who prefer using CakePHP, CodeIgniter, or Symfony? What happens when a new version of the selected framework comes out?
    As I mentioned in another thread, some heavy hints were dropped by Adobe at MAX about improved support for PHP in CS5. However, you'll need to wait until Adobe makes an official announcement to find out what form it will take. From what I hear, the improvements are very impressive. Whether they will satisfy everyone remains to be seen. That's why it's important to send feature requests to Adobe. Most decisions on new features are made in the two or three months immediately following a release. CS4 is already a year old, so it's a bit late for any feature request to be implemented in CS5. But good ideas, well presented, can help shape the direction of future versions.

Maybe you are looking for

  • Web service and ejp enterprise in JBoss

    Is Java a compiled language? Actually, Java is a compiled/interpreted language. See the links below. This is the best classification for the Java language, in my opinion. Read [_this thread_|http://forums.sun.com/thread.jspa?threadID=5320643&start=0&

  • File name already exists?

    The past few days, I've had trouble exporting certain sequences from FCPHD using Compressor 2. Basically, when I go to export via compressor, the error "File Name Already Exists" pops up. However, the sequence still appears in the compressor window.

  • Not able to view more than two line in table control

    Hi all, I am not able to see more than two lines in table control. Although my table control height is 21... Please see attached pic and suggest me what to do.

  • I need to know what version of iOS my mac from 2008 supports

    hello I am trying to update my iOS, the one I have is snow leopard on my macbook, but I dont know if theres a newer one that may mac can support

  • Tab groups disappear each time i reopen firefox - and saved tabs do not open up either.

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/879179]]</blockquote> I sent this same complaint yesterday. What I need is someone to contact me to let me know what to do about the problem. I have received NO feedback.