WebLogic and OSGi - deployment

Is there a way to run an OSGi container in the Weblogic Application Server? I know that it works with JBoss, Glassfish and there are possibilities to add an Equinox servlet bridge to your OSGi project (implementation of the bridge is too old). But I want something similar to JBoss/Glassfish functionality where it is very easy to deploy your OSGi environment, because there are already OSGi implementations. Most of the articels I found were very old and there are no more recent ones. Can someone help with hints or better some links?
Maybe Bnd could create a .war file for me, but how can I achieve it. I read there is a possibility. Example would be great!
EDIT
Just for those who still look into that case. Since version 12.1.2 Weblogic supports OSGi out-of-the-box.

I'd consider the Apache Felix Http bridge. It worked a lot better for me than the ancient Equinox bridge (I messed around with it for a while, but never got it to work well), after I switched to Felix I got something working pretty quickly.
If I understand you correctly, you want to make a 'plain' war file, that can be deployed in any Java EE server. If that's the case, there is nothing OSGi about your war file, so I don't think Bnd will do anything for you.

WebLogic now supports OSGi in version 12.1.2 . See this

Related

Glassfish Hot Deploy with File Synchronization

I was looking for someway to perform hot deployment on glassfish. I was find this guide:
http://entjavastuff.blogspot.se/2010/11/hot-deploying-from-eclipse.html
which is exactly what I am looking for. Unfortunately, this is for JBoss. I do not know how to handle it for Glassfish.
Can you please help me transform the part "Configure destinations" to Glassfish directories instead?
Best regards
It would be exactly the same, except, rather than pointing the synchronization of files to the JBoss deploy directory, you would point them to the glassfish/domains/domain1/autodeploy directory.
Forget that.
"File open failure" compiling java class to glassfish autodeploy
If somebody find a Java EE 6 container you can do autodeploy, please share it. I have pass the last month trying do do an autodeploy on JBoss, WebLogic and Glassfish. It never worked.
Lesson learned: Do not use Java EE. Use Spring on a simple tomcat.

Eclipse configuration to support dual Equinox/Felix environments

What are some configuration changes to make Eclipse PDE best support working with both Equinox and Felix?
Here's an example problem I'm currently having. I can run my application ok via the Eclipse OSGi Framework launcher. Similarly, there are no compilation problems in PDE. However, when running in Felix I will get NoClassDefFoundErrors:
java.lang.NoClassDefFoundError: org/w3c/dom/DOMException
My understanding is it's my Eclipse setup that is at fault here; org.w3c.dom is not a 'default' OSGi package and shouldn't be loaded when I run it in Eclipse. Similarly, the import in my code for org.w3c.dom.DOMException should be an error.
I know how to fix this for Felix: declare an Import-Package. But that's not my question. My question is how to force Eclipse PDE to take on a closer configuration to Felix... basically to make it stricter in loading packages?
I think Equinox does behave like Felix, if you run it stand alone. It's more of an Eclipse legacy thing than an Equinox thing, as stated on osgi.org.
As far as I know, there isn't any way to override the boot delegation from Eclipse, but I'd love to be proven wrong, as I've faced this problem often.
If you are developing a server application I recommend to not use the PDE at all. I am using maven and the maven bundle plugin to develop my bundles. Then I deploy on Apache karaf. Debugging also is quite simple by using the karaf dev:watch command and remote debugging. I never really missed the PDE features and they never worked well with my maven build.
This sounds like that launcher is setting bootdelegation to legacy mode. See the following page on the OSGi Wiki: http://wiki.osgi.org/wiki/Why_does_Eclipse_find_javax.swing_but_not_Felix%3F

reference for ejb jboss and eclipse development

is there a reference or book, maybe a tutorial that can get me started with ejb using the technologies that I have mentioned above?
thank you
You can take a look at the JBoss Tools if you're interested in developing Java EE applications in Eclipse.
If you already know EJB (and if you don't there is quite good Enterprise JavaBeans 3.1 book) you know you can develop your EJB's as plain POJO's just with annotations. No need for fancy plugins here.
You would, however, need a plugin to easily deploy your application to the server. In this case, take a look at these JBoss Tools and this topic.

Cannot find OpenPortal Portlet Container 2.x when creating a new server runtime environment in eclipse

I just started learning portlet and got stuck in the first place. I have installed JavaEE 6 SDK, Eclipse Helios and GlassFish Server 3.0.1. I also successfully configured OpenPortal Portlet Container (OPC) for GlassFish by running command:
java -jar portlet-container-configurator.jar
The problem come up when I wanted to create a new server runtime environment of OPC, there was no "OpenPortal Portlet Container 2.x" node like the tutorial said. I googled and found that I needed to install Eclipse Portal Pack but the link was dead.
Any suggestion, please?
Best Regard.
If you want to develop portlets, I strongly recommend downloading Apache Pluto instead of using the open portlet container; you can download a version of Tomcat bundled with Pluto from their site: http://portals.apache.org/pluto
Actually, Pluto has a few quirks that you need to get past (for example, it wants you to run an 'assembly' step to add some entries to your web.xml) but once you do it is probably the best way. You could also try Liferay or JBoss' GateIn for development, but if you are ultimately targeting a vendor supplied platform like WebSphere, you might find that these actually have features that aren't as portable, whereas Pluto is really just a simple implementation of the portlet spec.
I have found the .jar file on Internet. Thanks for watching.

Jboss4 inside OSGI

Is it possible to run Jboss 4.2.3 as a bundle inside OSGI container? What would be the challenges associated with it?
For those who cares, I am looking at running dcm4chee inside OSGI.
While not impossible it would be incredibly hard, a simpler alternative would be to embed OSGi inside JBoss, see:
http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
and
Programmatically Start OSGi (Equinox)?
and
http://njbartlett.name/2011/03/07/embedding-osgi.html
http://www.dcm4che.org/jira/browse/DCM-308 Looks like they're adding support to make the Jars valid bundles - couldn't you just work out the dependencies and deploy these to an OSGi framework? OSGi has support for JMX and JNDI.
Unless there are huge dependencies on JBoss' internals, I'd suggest the second option, but beware of Class.forName usage and other non-osgi-friendly code.
I logged the bug specifically for the dcm4che (note 1 e) toolkits, not the dcm4chee war. I would suggest logging a new issue for the dcm4chee assembly. However, making the dcm4che toolkit components osgi bundles would likely be a required step in the direction of getting dcm4chee to run in an osgi container.