'Agile Development with JBoss Seam' Download
Filed Under: SeamDownloadJBossJBoss World 2008
Unfortunately, the dry run that I gave to my JUG before-hand didn't help at all, because the atmosphere at JBoss World put me into a 'sharing' mode so that all I wanted to do was dump everything 'Seam' from my wet squishy brain onto the folks that attended my presentation.
So even though the actual presentation didn't go the way I wanted it, the work I put into it did.
To download the slides (format is OpenDocument Presentation), click here: www.evolutionnext.com/blog/files/jbossworld_presentation.odp
To download the demo seam-gen project, click here:
www.evolutionnext.com/blog/files/jboss_world_2008_download.zip
The download requires a little bit of setup. Don't worry, it isn't anything difficult. ;) All of the information you need is in the README.txt file (located in the demo seam-gen project zip file). The demo is licensed as GPLv3 to encompass all of the component's licenses.
I was thinking of maturing this little project as a reference implementation for testing in Seam. If anyone out there is interested in having me upkeep this demo, let me know. One consideration that I need to make is whether to host the demo from here or add it to the Seam project. I am leaning towards the latter.
JBoss World 2008, Orlando, Florida
The Keynote gave clarity to how jboss.org is set up for open-source development and community, and jboss.com is the production and support based website that will be their money maker.
The Introduction To Seam presentation got a lot of fanfare, so much so, that I wasn't able to get in on it. That's OK since I know Seam anyway. The BOF by far was the best part and perhaps the 2nd best reason for coming (the 1st being that I will be presenting Agile Development using JBoss Seam on Friday). I got a few of my questions out of the way.
My first question, was how to get rid of more of LIES (LazyInitializationExceptions) other than just use the SMPC. Pete Muir and Gavin King helped to explain that if I have a session scoped entity bean for example and have a conversation based session bean that has reference on the entity bean, then that session will naturally have issues with transaction locking and produce the LazyInitializationException. The overall answer was that LIES should never happen in JBoss Seam, and if you get the error message in anyway then you are obviously doing something wrong. I am going to have to research more about the scoping and workarounds and I will have an article posted either here on my blog, or in the seamframework.org website.
That brings me a to a great segue, the Seam Framework website is up and running out of alpha, and I got to say, that is absolutely impressive. If you need to see a complete implementation of jboss seam in a production environment sign up and try it.
The other question I asked is how I can inject components into my validators and converters in JSF without using Component.getInstance("<<component name>>"). Using the getInstance method of course makes testing very difficult. Pete Muir explained that their hands were tied. The reason for @BypassInterceptors and the use Component.getInstance("<<component name>>") is because jsf reserializes the validator or converter object, and in the JSF domain it cannot recognize the @In annotation and provide the correct injection.
That's it for now....currently I am attending the 2nd keynote with a complete "business value, paradigm shift, SOA, value added, ROI, service mix" happy business feel good discussion.
Agile Development Using JBoss Seam @ JBoss World 2008 in Orlando
Filed Under: SeamDaniel HinojosadbunitJSFJBoss SeamxmlunitseleniumJBosspresentationXML UnitJBoss World 2008easymock
I was accepted to present at JBoss World 2008 about a couple of months ago, and I am just about done crafting my presentation. My presentation highlights how to unit-test, integration-test, and acceptance test your jboss seam web applications.
The presentation will use a slew of technologies from easymock to selenium. I only have a measly 90 minutes to go through it all, but I hope and anticipate that it will be exciting, entertaining , and informational.
My bio and information about the presentation is here. For complete information on JBoss World 2008 in Orlando and other presentations that will be presented, please visit jbossworld.com
Tue, 15 Jan 2008 08:31 PM PST
If the presentation is available online, I would love to review it.
The best damn web framework (Jboss Seam 2.0.0GA) is out....
The best java web framework, JBoss Seam 2.0.0GA is out and it is absolutely amazing.
What is so amazing about it?
- PDF generation
- email generation
- easiest ajax development
- integrated ajax widgets
- integrated facelets templating
- unit-test, functional-test, integration-test friendly
- component-based
- ejb3-based
- rapid-development
- conversation based scoping
- integrated security
- GWT integration
- extended JSF EL features
- and on and on...
I am so confident in everything that JBoss Seam does that I am ready to change my entire business around it. This is your complete solution in a web framework. I am updating a customer's site currently using JBoss Seam 2.0.0, and I am really excited about it mainly because Seam is expressive and keeps me productive. I look forward to doing more business with this framework for many years to come.
Disclaimer: I am not an employee or contractor with JBoss
Mon, 5 Nov 2007 03:59 PM PST
No claim like this can be believed until you provide why it is better compared to other web frameworks. Is its competition Tapestry or Wicket? Or is it the full-stack frameworks like Rails, Grails and .NET?
AFAIK, JBoss claims they're not competing with Java frameworks, but rather .NET. Have you tried .NET and verified that Seam is better? If so, what makes it better?
I believe it's good - it'd just be nice to see more proof behind claims like yours. Most of the folks I know that love it love it compared to plain ol' JSF, not compared to Wicket, Rails or Grails.
Personally, I'm more impressed with Rails and Grails.
Mon, 5 Nov 2007 10:24 PM PST
Matt,
I love how your Grails/Rails claim lacks the same proof you complain is missing from Daniel's assertion. Those who live in glass houses.....
Wed, 21 Nov 2007 08:09 AM PST
If you get the chance, don't decide until you've spent just 1/2 day with Wicket - it'll save you months of development and maintenance time.
Like the other authors on this topic here I have no time to justify why I feel strongly that this is so, so you'll just have to put aside a few hours to see for yourself if you are curious (http://wicket.apache.org).
Frankly, there have been so many baseless and semi-brain-dead java "web-framework" comparisons, insulting their audiences and wasting everybody's time lately ,by people who feel they are qualified to make sweeping statements without any real understanding of many of the products they are comparing.
At the end of the day, I'd say use one framework, get really good at it, and deliver good systems with it. Many of them are quite good these days, but Wicket is great ... IMHO ;-)
Mon, 7 Jan 2008 08:05 AM PST
Jason,
Matt has posted like a ton of comparisons about web frameworks in his own blog. If you do not document yourself before posting you should not include witty "glass house" comments.
OTOH, please compare a Google search of "wicket sucks" vs "jsf sucks" to get some background about Matt's point.
Woot! Dan Hinojosa's (that's me) java predictions for 2007
Filed Under: SeamGroovyRuby2007EJB3JavaGrailsRailsJBoss
Just a minute while I take out my crystal ball. It is currently sitting in my garage, caked over with dust. There! All dusted off and just like new.
Here are my predictions for the year 2007. Take note, because all of these will come true. Eat your heart out Nostradamus.
- Groovy will enjoy great success. People will love the idea of having a powerful scripting language that uses the well known Java API at their disposal. Groovy will bring about the repatriation of several Ruby users that defected from Java.
- Grails will see some success, but that success won't come 'til late 2007. This is because people need time to learn Groovy first, and the Grails developers will probably be working diligently towards version 1.0 throughout 2007.
- Developers will realize that SOA has nothing to do with Web Services. The SOA community will also gain a general understanding of what SOA really is, hopefully before SOA 2.0 comes out. ;)
- The Java community will continue to seek clarity on the future of Java and whether or not Java is meant to be an easy language to learn. Such ruminations will lead to more great debates on generics, in-line XML, the arrow operator, and whether it is Java's manifest destiny to include features from other languages in the JDK in order for Java to remain on top.
- EJB3 will finally be released by major vendors and will gain acceptance by developers.
- JBoss Seam will gain acceptance by many web developers, but will continue to have problems selling its idea because those same web developers will have difficulty wrapping their heads around what stateful development is and how it's useful to them.
- Legions of well-known web and desktop Java developers will be bored with web and desktop development and will start to get creative with Java on other devices.
- JUnit dominance will be relinquished to TestNG.
- Ant will be demoted by the masses as merely a vehicle for scripting to get builds done.
- Dependency Injection and Interface Oriented Design will continue to be accepted by Java Developers.
- The Google Web Toolkit will be the most talked about Java based product in 2007. It will bring non-Java developers to the Java language, eager to do outstanding things with AJAX without the need to code in JavaScript.
- With systems like Subversion/CVS, Google Calendar, Google Docs, Feature/Bug Tracking software, Gmail, Blogs and Wikis. Developer machines will be and should be relegated to being hard drives dedicated to holding only the JDK, version controlled source code and libraries, and music files that developers listen to while coding.
Now, go in peace, and spread the good words of what I have foreseen and given to you. ;)
Happy New Year!
Danno!
Getting JBoss 4.0.3 to work the JSF-RI
Filed Under: MyFacesJSFJava Server FacesJBossNullPointerException
If you are trying to get JSF-RI and JBoss 4.0.3 to work with each other, you are in for a special surprise. The following code will help de-stupefy the situation:
java.lang.NullPointerException
at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
The NullPointerException is a result of a collision with the JSF-RI. This error occurs only with JBoss 4.0.3 because it comes packaged with MyFaces. The following solution was recommended by JBoss in their wiki.
Fix for the all configurationThe all configuration has something missing from the all/deploy/jbossweb-tomcat5.5.sar/meta-inf/jboss-service.xml file. If using the all configuration with JSF you should edit the value of the FilteredPackages attribute to make it look like this:
<attribute name="FilteredPackages">javax.servlet,org.apache.commons.logging</attribute>
Note that there should be no space on either side of the comma. For more details on this issue, see http://jira.jboss.com/jira/browse/JBAS-2349
Using the JSF Reference ImplementationTo use the JSF Reference Implementation instead of the bundled MyFaces implementation, simply delete the jbossweb-tomcat55.sar/jsf-lib directory. Then, package the RI in your WEB-INF/lib directory as usual.
Note: You may also need to delete temp directories such as server/default/tmp and server/default/work. See comment by Geoffery in http://jira.jboss.com/jira/browse/JBAS-1508
I hope that helps.
Fri, 23 Mar 2007 04:04 PM PDT
I am using 4.0.5 jboss and that FilteredPackages is as you mentioned but I am getting that same error.
In the long run, I want to use ajax4jsp.
Please advice some help. Thanks!
JBoss severely hangs or freezes and you don't know why.
Filed Under: java:comp/env/processorfreezehangJNDIJBosshangsfreezes
Ok, so you have developed an enterprise application using JBoss. You deploy, and you fire up your web app, and it hangs. The web site never comes up and before you know it your processor is screaming. You check and double check. You're kicking in chairs and knocking down tables, in a restaurant, in a western town. What to do?
Well, I had this problem a while ago and corrected it. It came up again this morning. I knew I had resolved something similar. It was the same problem and of course the same solution.
The problem is that JBoss isn't a graceful server if you get a JNDI name wrong. So if you have this problem, double check the following:
- Your configuration files like your ejb-jar.xml or your web.xml. It is possible that names, links, or references are not matching up correctly.
- Your code. Remember that the standard lookup prefix is java:comp/env/ when looking up resources on a J2EE server. Check the names of the resources you are looking for in your code. This happened to be my problem consistently.
I hope this helps. I will check the mailing lists and bug databases and see if it has already been taken care of. If it hasn't, I will create a new report. If you have similar problems and/or solutions I would like to see them, so comment away.
Wed, 30 Nov 2005 10:48 AM PST
You must not catch or report jndi lookups or something. Secondly, all deployment errors are in the logs (server.log or stdout). JBoss has had its bugs over the years but silent naming failures? That is a new one on me.
Wed, 30 Nov 2005 11:29 AM PST
No I am looking at my code and all my errors march up correctly and float to the surface if anything goes wrong. I think what I will do if I have time is find a small app on the net and break it. If I am wrong I'll fix my app. If I am right I'll report.
Setting up a virtual host in JBoss
Filed Under: server.xmlApachemod-jk.confhttpd.confVirtualHostJ2EEJBossVirtualHosts
A few days ago, I set up a virtual host on my server using JBoss/Tomcat with an Apache front-end. It was pretty simple. First thing is that I edited the server.xml document located in the tomcat sar directory in the deploy directory of your favorite server (minimal, default, or all). When I refer to the tomcat sar I am referring to the sar directory that houses all tomcat information. On my current server (JBoss-4.0.2), the sar directory is called jbossweb-tomcat55.sar
In the server.xml file you will see something similar to the following...
<Server>
<Service name="jboss.web"
className="org.jboss.web.tomcat.tc5.StandardService">
<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" address="${jboss.bind.address}" .../>
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector port="8009" address="${jboss.bind.address}" .../>
<!-- SSL/TLS Connector configuration using the admin devl guide keystore
<Connector port="8443" address="${jboss.bind.address}" .../>
<Engine name="jboss.web" defaultHost="localhost">
<Host name="localhost"
autoDeploy="false" deployOnStartup="false" deployXML="false">
....
</Host>
<!--Here is where you will set up your hosts -->
</Engine>
</Service>
</Server>
Inside the engine element is where you will set up your hosts configuration. Currently there is a host set up for localhost. What needs to be done is that there needs to be a sibling to localhost set up for your new virtual host.
<Server>
<Service name="jboss.web"
className="org.jboss.web.tomcat.tc5.StandardService">
<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" address="${jboss.bind.address}" .../>
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector port="8009" address="${jboss.bind.address}" .../>
<!-- SSL/TLS Connector configuration using the admin devl guide keystore
<Connector port="8443" address="${jboss.bind.address}" .../>
<Engine name="jboss.web" defaultHost="localhost">
<Host name="localhost"
autoDeploy="false" deployOnStartup="false" deployXML="false">
....
</Host>
<Host name="virtualhost2" autoDeploy="false"
deployOnStartup="false"
deployXML="false">
<!-- Add all your aliases here -->
<Alias>virtual.evolutionnext.com</Alias>
<Alias>myvirtual.evolutionnext.com</Alias>
<!-- Set up logging -->
<Valve className="org.apache.catalina.valves.AccessLogValue" prefix="virtualhost2" suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log"/>
<DefaultContext cookies="true" crossContext="true" override="true"/>
</Host>
</Engine>
</Service>
</Server>
Restart the JBoss server and your JBoss server is ready to host a new subhost. Remember to update your DNS servers! Unfortunately the simplest things are the hardest to figure out, and it took me a while to figure out to update my DNS server.
If you are using Apache as a front end. What I did is modify my mod-jk.conf to let all traffic through to JBoss and let jboss take care of the virtual hosting. There is a sample of my mod-jk.conf below. Before doing this the easy way, I was trying to set up a virtual through httpd.conf and that seemed to have been fruitless and aggravating. You should probably know already by now how torturous it is to edit the httpd.conf file. I think you will find it a pleasure to let JBoss handle all J2EE virtual hosting.
# Load mod_jk module # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkRequestLogFormat JkRequestLogFormat "%w %V %T" # Mount your applications JkMount /* mainWorker
Notice my JkMount is letting all traffic through. If I have something else specific that I need apache to care of I provide an explicit path in my httpd.conf directory. That would usually be non-J2EE services like Subversion for example.
The last thing that is needed, is to adjust your webapp. If, in your war file you do not have a jboss-web.xml file in your WEB-INF directory, create one, and put in the following. If you are updating yours, then make sure that it has the following elements...
<jboss-web> <context-root>/</context-root> <!--Make what ever context root you want --> <virtual-host>virtual.evolutionnext.com</virtual-host> </jboss-web>
This will route traffic to the Alias mapped in your server.xml file. Now, try to go to your new subhosted website and it should work like a champ. If it doesn't, post me a comment.
Mon, 5 Sep 2005 10:33 PM PDT
Nice documentation. It should be enough to undeploy jbossweb-tomcat.sar. No need to restart the entire JBoss.
Tue, 11 Oct 2005 04:42 PM PDT
Can you please provide some sample/example values/paths of the
Wed, 12 Oct 2005 08:18 AM PDT
Something like this is all you need. You can change your context root to whatever you would like. In the virtual host tag you need to give it a value of what you want your server name to be.
/ virtual.evolutionnext.com
Thu, 20 Oct 2005 05:46 AM PDT
I have follwing env: -apache2 with few virtual hosts defined (one is defined to work over ssl) -mod_jk2 configuration to work with 2 JBoss containers (their tomcats in fact) -2 jboss identical containers contain few j2ee web app (same apps in both) The problem is I'm not able to make one of those j2ee web app to work with ssl. They all work ok with http but not with https. Should I change something in jboss configs, or it should all have to do with apache?
Thu, 20 Oct 2005 03:59 PM PDT
I usually use Apache for the SSL certs.
Sat, 25 Feb 2006 12:27 AM PST
If I have the war's in (separate) ear's, what should context-root say in:
ear1/META-INF/application.xml ear1/war1/WEB-INF/jboss-web.xml ear2/META-INF/application.xml ear2/war2/WEB-INF/jboss-web.xmlMaybe I should NOT have context-root in my jboss-web.xml at all?
Regards Wesslan
Sat, 25 Feb 2006 09:01 PM PST
Really whatever you want them to say. It makes no difference.
Sun, 13 Nov 2005 12:55 AM PST
Can we configure jboss and tomcat to work simultaneously with apache. if yes thwn plz mail me.
Thu, 19 Jan 2006 11:44 PM PST
could anyone tell me how to update the DNS Server
Mon, 30 Jan 2006 09:09 PM PST
Is Apache required to allow virtual hosts. I have followed your example (and also the one from JBoss) and I get this response when I set up this configuration. HTTP/1.1 400 No Host matches server name vhost.mydomain.com I run my own DNS server and added vhost.mydomain.com to its records, so I know that's up and running. Ideas?
Sun, 5 Mar 2006 06:47 PM PST
Do we have to or should use Apache with jboss? thank you for your time viz
Sun, 5 Mar 2006 08:29 PM PST
No it's optional
Wed, 15 Mar 2006 08:54 PM PST
Hi, I set up a virtual host in my JBOSS 4.0.2 Server with the following configuration of jboss-web.xml and server.xml and calling the following URL. https://ravipartner.com:8443/TOPS/contextroot/login.do jboss-web.xml
Wed, 3 May 2006 04:33 PM PDT
how to set vitual host to my site i am developed using jsp ans servlets i don't to how to redirect the server to my war file can some one help me
Tue, 20 Jun 2006 02:11 PM PDT
Hi all, Has anybody managed to host with jboss without Apache? I've tried every single possiblitly on winxp: the dns server is redirecting to my machine; the virtual host is deployed and when I test it, jboss is completely unware of any connection. Thank you for any suggestion
Thu, 10 Aug 2006 09:41 PM PDT
You need to tell jboss to listen on port 80 instead of 8080 by default (well tomcat to be specific), change server.xml
Sun, 29 Oct 2006 12:07 PM PST
In my case, the root cause of Tomcat error "No host matches server name" was that my
Fri, 31 Aug 2007 07:43 PM PDT
null
Tue, 9 Oct 2007 05:56 PM PDT
Hi,
Can you please provide some inputs as how i need to setup virtual host if iam using jboss 3.2.1. I tried the suggested method as done in jboss 4.0.2 but was not successful. Any pointers helping me to solve the problem is highly appreciated.
Thanks.
Mon, 29 Oct 2007 03:31 AM PDT
<div><u><font color="#000080" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy">Problem faced:</span></font></u></div> <div><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">My application is currently accessed as <a title="http://ptrack.tajtech.com/PtrackWeb/login/ListPageListRefresh.do" href="http://ptrack.tajtech.com/PtrackWeb/login/ListPageListRefresh.do"><font title="http://ptrack.tajtech.com/PtrackWeb/login/ListPageListRefresh.do" color="#333399"><span title="http://ptrack.tajtech.com/PtrackWeb/login/ListPageListRefresh.do" style="COLOR: #333399">http://ptrack.tajtech.com/PtrackWeb/login/ListPageListRefresh.do</span></font></span></font></div> <div><font color="#333399" size="2"> </font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">But when user keys-in <a title="http://ptrack.tajtech.com/" href="http://ptrack.tajtech.com"><font title="http://ptrack.tajtech.com/" color="#333399"><span title="http://ptrack.tajtech.com/" style="COLOR: #333399">http://ptrack.tajtech.com</span></font> ,he should be directly able to access the login page </span></font><font color="#000080" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy">,</span></font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">without</span></font><font color="#000080" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy"> the necessity </span></font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399"> giving the full link.</span></font></div> <div><font color="#333399" size="2"> </font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">Hope you got my requirement.</span></font></div> <div><font color="#333399" size="2"> </font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">My application is deployed in JBoss4.0.4</span></font><font color="#000080" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy">.</span></font></div> <div><font color="#333399" size="2"> </font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">Please find attachment of server.xml and jboss-web.xml for this application</span></font><font color="#000080" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy"> which I have edited after some self study to meet the requirement</span></font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">.</span></font></div> <div><font color="#333399" size="2"> </font><font color="#333399" size="2"> </font><font color="#000080" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy">p</span></font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">track.tajtech.com is the DNS name created for our application.</span></font></div> <div><font color="#333399" size="2"> </font><font color="#333399" size="2"><span style="FONT-SIZE: 10pt; COLOR: #333399">Kindly, help me out to solve this issue.</span></font></div>
Thu, 6 Dec 2007 04:30 PM PST
null
Thu, 6 Dec 2007 04:33 PM PST
Hi, Could you please provide a sample using Jboss 4 (Latest) to have the Default portal go to the domain name?
http;//www.mydomain.com loads the Default portal. So far I have only been able to load the Jboss application server with my domain.
Appreciated
Thanks
Thu, 13 Mar 2008 12:08 PM PDT
Looks awesome – do you have any A/V from the presentations you gave? If not, interested in giving it another go maybe at my local JUG if we can work it out?
Most of them seem to be Grails disciples, and we should change that! :)