Creating Seam 3 Project - seam

Its probably a bad question, but i've not found any good tutorial showing how to create a seam 3 project to eclipse. I saw that i need maven, jboss, seam 3, and eclipse helios... then i've downloaded them all but couldn't create the project... also got m2eclipse plugin...
Someone know a good tutorial, or can help creating this project?
Thanks for all.

You won't find a tutorial because SEAM 3 isn't a framework like SEAM 2 was.
Seam 3 is a collection of CDI extensions that add functionalities to a Java EE 6 application. Each of these module has it's own documentation. You can check them on Seam 3 Website.
For instance the Seam Social (which I'm the tech lead) is a bunch of CDI beans to facilitate the integration of social network in a Java EE 6 dev.
A good starting point for using those modules could Be the project Seam Forge which is a RAD tool to create a Java EE 6 + CDI + Seam 3 application. You should give it a try.

Related

Spring 4.0 vs Java EE 7 [duplicate]

I have been doing Java SE for some years now and moving on to Java EE. However, I have some trouble understanding some aspects of Java EE.
Is Java EE just a specification? What I mean is: Is EJB Java EE?
Are EJB/Spring different implementations of Java EE?
I am sorry to ask but I have some difficulties to understand what Java EE is.
Could someone explain what Java EE is? And EJB?
(Updated Feb 2022)
First of all, "Java EE" has since Sep 2019 been renamed to "Jakarta EE", starting with version 8. Historically, there was also the term "J2EE" which covered versions 1.2 until 1.4. The term "Java EE" covered versions 5 until 8. See also Jakarta EE, History on Wikipedia.
Is Jakarta EE just a specification? What I mean is: Is EJB Jakarta EE?
Jakarta EE is indeed an abstract specification. Anybody is open to develop and provide a working implementation of the specification. The concrete implementations are the so-called application servers, like WildFly, TomEE, GlassFish, Liberty, WebLogic, etc. There are also servlet containers which implement only the JSP/Servlet part of the huge Jakarta EE API, such as Tomcat, Jetty, etc.
We, Jakarta EE developers, should write code utilizing the specification (i.e. import only jakarta.* classes in our code instead of implementation specific classes such as org.jboss.wildfly.*, com.sun.glassfish.*, etc) and then we'll be able to run our code on any implementation (thus, on any application server). If you're familiar with JDBC, it's basically the same concept as how JDBC drivers work. See also a.o. In simplest terms, what is a factory?
EJB is part of the Jakarta EE specification. Look, it's in the Jakarta EE API. Full-fledged Jakarta EE application servers support it out the box, but simple JSP/Servlet containers don't.
See also:
Where can I find a list of all the reference implementations for Java EE 6?
Java / Jakarta EE web development, where do I start and what skills do I need?
What to learn for making Java web applications in Java EE 6?
Are EJB/Spring different implementations of Jakarta EE?
No, as said, EJB is part of Jakarta EE. Spring is a standalone framework which substitutes and improves many parts of Jakarta EE. Spring doesn't necessarily require Jakarta EE to run. A bare-bones servlet container like Tomcat is already sufficient. Simply put, Spring is a competitor of Jakarta EE. E.g. "Spring" (standalone) competes EJB/JTA, Spring MVC competes JSF/JAX-RS/MVC, Spring DI/IoC/AOP competes CDI, Spring Security competes JAAS/JASPIC, etc.
Back during the old J2EE/EJB2 times, the EJB2 API was terrible to implement and maintain. Spring was then a much better alternative to EJB2. But since EJB3 (Java EE 5), the EJB API was much improved based on lessons learnt from Spring. Since CDI (Java EE 6), there's not really a reason to look at again another framework like Spring to make the developers more easy as to developing among others the service layer.
Only when you're using a bare-bones servlet container such as Tomcat and can't move on to a Jakarta EE server, then Spring is more attractive as it's easier to install Spring on Tomcat. It isn't possible to install e.g. an EJB container on Tomcat without modifying the server itself, you would basically be reinventing TomEE.
See also:
When is it necessary or convenient to use Spring or EJB3 or all of them together?
Java EE 6 vs. Spring 3 stack
Using JSF as view technology of Spring MVC
Java Enterprise Edition (Java EE) is an umbrella specification that references a number of other more detailed specifications, of which Enterprise JavaBeans (EJB) is one of the more important ones.
Read this - it explains the difference between Java EE and Spring
Thanks...
Source -- Java 2 Platform, Enterprise Edition (J2EE) defines the standard for developing component-based multitier enterprise applications. J2EE simplifies building enterprise applications that are portable, scalable, and that integrate easily with legacy applications and data .
Source -- Enterprise JavaBeans (EJB) technology is the server-side component architecture for Java Platform, Enterprise Edition (Java EE). EJB technology enables rapid and simplified development of distributed, transactional, secure and portable applications based on Java technology.
Is Java EE just a specification? What I mean is: Is EJB Java EE?
Java EE is a specification.
EJB is server side component architecture for Java EE
Are EJB/Spring different implementations of Java EE?
Both EJB and Spring are different frameworks following Java EE.
J2EE/JEE/Jakarta EE
Java Enterprise Edition (JEE) is used to develop distributed application &
web services.
It’s a component based approach to develop web app.
JEE web apps are considered as 3 tiered apps, since it is divided on 3
different machines/tiers
Client (Presentation)
J2EE sever (Application/Business)
Database (Data Access)
Everything you need to know about Java EE may be found by starting # Oracle official website, among other. You may also find interesting to read the specification APIs for release 8. It is worth taking the time to go through the Java EE 8 tutorial. You may want to start with it actually, because it provides a very good overview of the whole platform.
To put simply - JavaEE is a platform.
It is made up of many specifications which are just APIs. The specific concrete implementations of these APIs are the so called 'Reference Implementation'
EJB is just one specification within the JavaEE platform
No, Spring is a application framework that can allow you/has support for you to develop JavaEE applications
EJB is Enterprise Java Beans

Downgrade/convert mvc 4 to mvc 3

I know this is a rather odd question, please don't flame me :)
I have a concrete need to "downgrade" a current Asp.Net Mvc 4 (net framework 4.5) application to Asp.Net Mvc 3 (net framework 4.0) because our shared hosting provider does not support .Net 4 (I know it's crazy considering it's been in retail since 12 Aprli 2010 and first beta came out in May 2009 but it's not the point of the post).
Is there any tool, or guide, or anything that could help in the process? I'm getting a bit lost because I upgraded many
applications
but I never had to downgrade one.
I have use some of the features like begincollectionitem which may not be direct compatible to mvc3
I doubt you'll find an official guide or tool, you'll have to do it manually. Personally, I would do the following:
Start a new MVC 3 Project (MVC3 is available via nuget)
Copy your files from one to the other
Fix any compilation issues
Use the publish site feature to publish somewhere locally (this will hopefully find compilation issues in your Razor views which don't get found during the project build)
Test the site fully!
Sorry it's not more helpful, but I don't think people generally design for the downgrade process.

Converting Play Framework Application to Spring MVC

We have done a quick proof of concept web application using PlayFramework1.2 and now we would like to proceed for production release however one of the concern is that Play Framework not enterprise compatible and wanted the application to be ported over to Spring.
Any tools or guidelines for porting over playframework project to spring MVC ?
Note: I'm saying not enterprise compatible because it seems Play1.x development been abandoned and no any new Play 1.x release recently. Also current Play framework 2.0 more focus on Scala rather than Java.
As above posters mentioned Play 1.x was an initial draft. I was in your shoes contemplating whether to rebuild the app in Spring but I gave Play 2.x a chance and now I don't think I want to go for Spring at all. With every release Play is becoming more and more feature rich. I think before migrating to Spring you should give Play 2.1 a chance. Moreover if you need Spring for DI then you can actually mix Spring with Play 2.1 as well. See this demo app:
https://github.com/guillaumebort/play20-spring-demo
Hope that helps.

rebuilding subsonic 2.2

I haven't programmed for 2 years so please be gentle in your answers. I'm returning to an old asp.net 2.0 project i wrote a few years ago using subsonic. I can't work out how i got subsonic working in this asp.net project as it is an old version (2.1) and the documentation for 2.x doesn't ring any bells with how I used to have to build the code. Anyhow, I have downloaded subsonic 2.2 and have managed to get that to work so I will use this in the website. However I have seen various webpages saying that subsonic 2.2 requires a very specific version of the mysql data connector (5.2.3 i think) and that I should rebuild subsonic 2.2 with a newer version of the connector.
Questions: is this necessary? If so why? Can't i just use version 5.2.3 of the connector in my website or does asp.net override it with its own version (by the way i generate my DAL in a separate class project and not the website itself)? Can i prevent this from happening? If this is necessary, how do i do it as I really can't remember. Would i just create a new project, add the subsonic source files and the appropriate connector dll and rebuild the subsonic dll or is it more involved than that? Is subsonic 2.2 still supported or am I flogging a dead horse trying to use it?
thanks a lot
As you generated your DAL in a separate class project then you should be able use whatever version of the MySQL adapter .dll you like in your web project.
The other option is to use SubCommander program to generate the classes.
I'd strongly advise grabbing the latest version 2.x from https://github.com/subsonic/SubSonic-2.0 and compiling your own. Failing that if the project isn't too large then maybe look at migrating away? SubSonic was a great tool at the time but there are much better options available now.

N-tier web application sample with Ninject?

I am trying to learn how to use dependency injection and Ninject. I've been reading blog posts on the topic and Mark Seeman's book "Dependency Injection in .NET". While I have a general understanding of DI, I have troubles understanding how to organize code in a n-tier web application.
Does anyone know of a project sample that I can download, or a blog post to review? Even better if the sample is based on Ninject and MVC3.
NerdDinner is a sample ASP.NET MVC project, and it has been updated to MVC 3: http://nerddinner.codeplex.com/
There are modified versions of the old MVC 2 version that use Ninject and Unity for dependency injection: http://nerddinneraddons.codeplex.com/ The author of those projects provided a different sample application using MVC 3 and Entity Framework 4.1: http://efmvc.codeplex.com/ but used AutoFac rather than Ninject for dependency injection.
There's S#arp Lite, a light version of S#arp Architecture recently started by S#arp Architecture's original author.
His introductory blogposts:
Introducing S#arp Lite ...S#arp Architecture's pompous little sister
S#arp Lite: The Basics

Resources