I'm looking for some tutorials about portlet in internet, but i can't find a good one. I need to migrate a portlet deployed in websphere 6 to jboss 7, i have some questions about it and i hope you can help me
is it possible migrate a portlet from websphere to jboss 7? I understand that you need a portlet container and i can't find that reference in jboss 7
I found in jboss page a project called GateIn, that looks like be a portlet container, is this correct?
A portlet developed in websphere can migrate to other application server without modification in your code?
None of my co-workers know about portlet, and because the few examples in internet, i think this is a almost deprecated solution, is this correct?
thanks!
1) Yes. Portlets are defined in a JSR specification (v1 is JR-168 and v2 ios JSR-286). Which means as long you have a portlet that complies with spec, you should be able to move it to any portlet container that complies with the spec.
2) Yes, GateIn is a portlet container.
3) As long as the portlet isn't calling any WebSphere specific API calls, you should be able to move it to another portlet container.
4) Portlets are far from deprecated. There are multiple portlet containers (WebSphere Portal, Liferay, GateIn and still a few more). Many of these containers still receive frequent updates and are being deployed for new websites.
There should be a sufficient amount of tutorials / discussion around the web if that's what you mean by "examples". Even looking on SO, you can find new portlet questions.
1- Yes this is possible, the only requirement you have is that your portlet should be a JSR168/286 compliant ().
2- Yes gatein is the eXo&Jboss Portal including a Portlet Container.
3- Yes, if it is a JSR 168/286 compliant portlet and does not depend on a Websphere API
4- No, there are many products using Portlet technologies like Gatein, eXo Platform or Liferay
Here are some portlet samples that could help you https://github.com/gatein/gatein-portal/tree/3.5.x/examples/portlets
Related
I have developed a Primefaces- Spring Application.
I have installed Liferay IDE/Plugings/server. I Want to deploy the Primeface-Spring application a s a portlet to my Liferay Portal. How do i achieve it? Please help.
Mmm... if I well undestood, you create a standard web application and need to deploy it as a portlet?
I'm sad to say that it is impossible: you need to convert your webapp to a "portlet application" before deploy.
By the way Liferay tries to meet your need... you can deploy your webapp inside your application server like any other web application. So your webserver will be able to serve Liferay (in root context) or your application in its context. Then you have to embed it inside a liferay "Embedded page": just create an "Embedded" page using your Liferay admin features.
This solution uses an iframe, so if you prefer you can try to use a "web-proxy" portlet (to integrate your code server side): see here http://www.liferay.com/it/community/wiki/-/wiki/Main/Web+Proxy+Portlet
Next time you develop a portlet application a good starting point is to understand basics on portlet lifecycle, then to develop it directly thinking on a portlet.
It should be possible to deploy your PrimeFaces+Spring web application as a portlet in Liferay using Liferay Faces Bridge. The purpose of the bridge is to provide developers with a way to develop JSF applications without being concerned about the Portlet API. The Liferay Faces project has a primefaces4-portlet demo and a jsf2-spring-portlet demo that you can download in order to verify that these technologies work in your Liferay Portal environment.
Is Liferay the same as Spring? Are they two different types of products? I can't tell if Liferay is a CMS, framework, or all of the above. Do I need something like JBoss to run it Liferay?
Is Liferay the same as Spring?
No. Liferay is a Portal. Spring is a framework for application development.
Spring is mainly used to address Inverion of Control and Dependency Injection.
A portal can be seen as a collection of small/mini web-applications
(providing limited features and information) normally called as portlets.
Please check SO info about Portal and Spring for more details.
Are they two different types of products?
Purpose for which they are used is different, but one can integrate Liferay with Spring
to make application development faster and efficient.
I can't tell if Liferay is a CMS, framework, or all of the above.
Liferay is a Portal which among other features supports CMS.
Do I need something like JBoss to run it Liferay?
Liferay comes as a bundled package with Servlet Container like Tomcat or
a fully fledged Java EE container like Jboss, Glass fish etc.
You can download community edition here.
I have never worked with portals before. So I am confused now. We have an application which is working with Spring and tomcat 5.5. So now they are telling me to use JBoss portal on top of that. My question is that is it possible to link my application which is already done with jsp, spring, etc to the JBoss portal. When I want to install JBoss portal as options it has JBoss7 and tomcat 6 options. This wouldn't interfere with my own app which has to run on tomcat 5.5. Am I right?
Thanks.
The closest you can get is with JSR 329 which allows to bridge JSF1.2 applications with JSR 286 based portal environment. The JBoss implementation of JSR 329 called JBoss Portlet Bridge gives you the flexibility to run SEAM as well in portal environment without knowing the details of the portal technology. In addition to this, you can also explore Spring's Portlet MVC Framework but the limitation with this framework is your portlet implementation would be in JSR 168 style which is earlier/base version of portlet specification. Another option for you is to develop a separate portal application with portlets calling your business layer services directly to get the work done. I am not aware about any other frameworks/technology you can use to run spring applications in portal environment. And so go ahead with detailed requirement analysis session with your team and identify how they really want the portal to function.
I am thinking about a platform for study application (it is team work). I mean standard Java EE 5 (or maybe try raw Java EE 6) and Spring. What is your choose? (I don't mean Spring MVC but Spring Beans and EJB 3.0)
Also I would like to know what app server you use? (now I use GlassFish v2)
I would recommend Spring without EJBs.
My favorite choice of Java EE app server is WebLogic, but I don't know if Oracle is as generous as BEA was about making it available to developers.
I'd recommend using Tomcat as your app server. If you need JMS, add ActiveMQ.
As duffymo says, look at Spring without EJBs. Spring is very powerful, regardless of how much/little you use. I don't know of anyone using EJBs now. Having said that, EJBs have changed dramatically over the years, and now resemble ORMs such as Hibernate (which is worth checking out in itself).
For app servers, check out JBoss. It's free/open-source, and you can choose the web component between Tomcat and Jetty. It's JMX backbone allows you to easily monitor its state and to integrate your own JMX beans into that backbone (if you're using Spring, you can JMX-enable any bean with a simple configuration).
If you want Java EE 6 then the choice appears to be either Glassfish 3 or the beta of JBoss 6. As some of the others have said, I also prefer Spring to Java EE's EJBs.
I don't see much point in looking at Java EE 5, unless you think you will be working with it in the future (possible as some companies are conservative in using newer versions of technology).
first of all: that might be a newbie question. However after few searches I cannot find anything that would bring me further.
Basically what would be the reasons to choose an app server over a Spring framework to develop a medium complex web application? I am fairly new to Spring, did some hard core WebSphere for few years. While reading about Spring I see that it comes with a good bunch of features (transactions, persistence, messaging, connectors etc). Is Spring hard to scale or manage in a clustered environment?
Any comments welcome.
Thanks
Spring is awesome.
Your terminology is way off though. Spring is a Framework. It's a library that you use to write a web application.
An app Server is what your application runs in. You need both. For example, use the Spring Framework to create an app that runs in the Tomcat app server.
EAR files aren't a requirement for doing Java EE development.
It's not either/or: if you deploy a Java EE application you need a container of some kind.
I've deployed Spring apps on Tomcat and WebLogic. I think WebLogic is the best Java EE app server on the market. My decision about whether to deploy to it or not would be based strictly on availability.
You've seen that Spring has their own Java EE container now. It forks Tomcat and marries it with OSGi and Spring. I haven't tried it yet, but if the quality is similar to their framework it will be very promising indeed.
Are you really asking "When would I write an application using Spring? When should I choose EJB3?"
My preference these days is Spring. I can do persistence, transactions, messaging, web services, and everything else I need.
Bpapa,
you got me there, yes the terminology is wrong. I meant Spring + web container vs. App Servers. Surely the web app has to be deployed somewhere. I guess that shifts the question to the server side features as per my first post.
Topology example: Spring + Tomcat vs. WebSphere.
As a side note: people argue if Tomcat is an app server, many consider it rather a web container. You could not deploy an EAR file to Tomcat, can you? All it takes is a WAR, am I right? But that gets too academic.
Thanks a lot
Rod Johnson's "Expert 1:1 Java EE Development Without EJBs" is the basis for Spring. It's an excellent book, but I'd say it's a bit out of date now. The book was written with EJB2 in mind. It was published before Spring became an open source project. The framework is up to version 3.0 now, so I'd say that the book is of historical interest only. I'd recommend a more modern take on the question that takes Spring 3.0 and EJB3 into account.
%