tag:blogger.com,1999:blog-46656419144265972662024-03-13T17:05:57.477+01:00Daniel Noz - IT ConsultantThis blog is about Java EE development and agile software developmentDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-4665641914426597266.post-19773361976465726382013-10-17T12:27:00.001+02:002013-10-17T12:29:56.327+02:00Startups entdecken die Zielgruppe der TeenagerCheck out <a href="http://www.tbh.co">www.tbh.co</a>
My latest mobile app (messenger app for teenagers)
check out this article (in german though) about trending mobile messenger apps
http://netzwertig.com/2013/06/11/snapchat-ask-fm-tbh-startups-entdecken-die-zielgruppe-der-teenager/Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-91799757339762825912010-07-12T23:21:00.002+02:002010-07-12T23:39:23.326+02:00Social Network UpdateHi there!<br /><br />Several weeks have passed since my last blog post. But the last few days I spent some time updating my social web profiles.<br />There's a lot to do if you want to be up to date. And think of all the different passwords ;) But anyway, I finally finished reorganizing all my accounts. <br />On my <a href="http://www.google.com/profiles/d.noz80">google profile</a> you can find all the relevant information and social network links (Google Reader, Twitter, Xing, Picasa and LinkedIn).<br />Feel free to follow my shared items on <a href="http://www.google.com/reader/shared/d.noz80"> google reader</a> or add me on<a href="http://www.linkedin.com/in/danielnoz"> linkedin</a><br /><br />Greetings Daniel!Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com2tag:blogger.com,1999:blog-4665641914426597266.post-60783180296702470292010-04-10T14:44:00.008+02:002010-04-10T14:54:53.576+02:00Article about Agile Best PracticesHi there,<br /><br />Java Spektrum, a german magazine for java software development published my article about agile software development best practices. <br /><a href="http://www.sigs-datacom.de/fileadmin/user_upload/zeitschriften/js/2010/02/noz_JS_02_10.pdf">Here is the link (however it's written in german)</a><br />I put a lot of effort into this article. It is written from a developer point of view, but without any language specific issues.Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com3tag:blogger.com,1999:blog-4665641914426597266.post-15712509893540515162010-03-23T21:24:00.004+01:002010-03-23T21:46:30.351+01:00Maven - Netbeans - JavaEE5 -Compile on Save?Hi,<br /><br />it has been quite a long time since I published my last post. I have had a very tough time with lots of stuff to do.<br />But let's continue with a topic/a solution for a problem I have been waiting for several month.<br /><span style="font-weight:bold;">It's about developing maven JavaEE5 projects with Netbeans 6.8</span>. If you have the following project structure : one EAR which contains webprojects and ejb projects and you want to see changes you add to your web content (e.g. .jsp , .faces) directly in the browser without rebuilding or republishing, <span style="font-weight:bold;">Compile on Save</span> is the feature you should be looking for.<br />However, exactly for this usecase, it's not working. The corresponding <a href="http://netbeans.org/bugzilla/show_bug.cgi?id=177230">netbeans bugfix</a> is scheduled for Netbeans 6.9.<br />I think it is almost impossible to switch from ant (with ant-based projects it works perfectly) to maven. Maybe you ask yourself why I want to switch to maven? It's because of my favorite, the one and only <a href="https://hudson.dev.java.net/">hudson continuous integration server</a>. Hudson is optimized for Maven-based jobs and it makes it way easier to create, extend and monitor these jobs.<br />I am kind of surprised because only 4 people voted for this issue. It could be that it's because of the few Netbeans users. But among german voters in this survey at <a href="http://it-republik.de/jaxenter/quickvote/results/1/poll/72">jaxenter</a> I see that this can't be the case. So is it because the few JavaEE5 projects with maven? What's your opinion?<br /><br />DanielDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-77241633123268208842010-01-23T11:50:00.009+01:002010-01-23T12:22:16.700+01:00CDI JSR-299 updatesHi guys,<br /><br />I just want to tell you that I updated the post about <a href="http://daniel-noz.blogspot.com/2009/12/java-ee-6-cdi-jsr-299-my-first.html">my first CDI impressions</a>. I will update this post regularly (see the red bold update text), in order to have one blogpost that contains all the neccessary information for CDI beginners.<br />By the way, have you searched for <a href="http://twitter.com/search#search?q=CDI">CDI on twitter</a>?<br />Most of the results are not about JavaEE, but Mercedes Benz cars, as CDI also stands for Capacitor Discharger Ignition, which is used in many Mercedes Benz car models. :)<br /><br />Another funny thing is <a href="http://seamframework.org/Weld">WELD</a> TEST (Weld is the JSR 299/CDI reference implementation). In the last few days I was looking for a way to write JUnit test for the CDI features. As you need a container, it's tough to test it outside a container. However, Gavin King described in a forum post how to test CDI(Weld). There's going to be a WELD TEST. If you google it<a href="http://www.weldtest.com/">...you'll find ...</a><br /><br />Anyway, before jumping to the next JavaEE 6 component, I will try to write some Dependecy Injection Junit Tests and tell you about it... I am of the opinion that CDI testing has not been considered that much until now (at least you won't find much about it)<br /><br />Greetings<br />DanielDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-555489060223137542010-01-13T20:49:00.015+01:002010-01-13T21:54:48.174+01:00Happy Developers and the ROTI MeetingHi alltogether,<br /><br />As this i my first post in 2010, I wish you all a great start and all the best!<br />My holiday is over and project work has started.<br />Before continuing with more Java EE 6 examples, I want to tell you about two really great articles about the motivation of developers and the ROTI Meeting.<br />I really don't like any stereotype thinking, but as it exists I think it is very important for all the non developers to realize what developers really want....<br /><br />1) Being Set up to Succeed<br />- Good requirements<br />- Realistic Deadlines<br />"Being forced to build crap is one of the worst things you can do to a craftsman"<br />2) Having Excellent Management<br />3) Learning New Things<br />4) Exercising Creativity and Solving the right kind of problems<br />5) Having a voice<br />"When a developer speaks, someone should listen. When several developers are saying the same thing, someone should listen and act . . .quickly"<br />6) Being Recognized for Hard Work<br />7) Building Something that Matters<br />8) Building Software without an Act of Congress<br />9) Having Few Legacy Constraints<br />(this is taken from the following article at <a href="http://agile.dzone.com/news/how-motivate-developers-three">DZONE</a>)<br /><br />As a consultant who has a strong focus on developing applications I completely agree with all these points. It is often very hard to have no influence in the decision making process (<span style="font-weight:bold;">developers.getProjectRoles().contains(ProjectRoles.DECISION_MAKER)==false</span>). I also sometimes ask myself whether developing software is the main goal of some (software) projects, it could also be attending as many meetings as possible. What I care most about is point 5. Agile Processes, where problems can be solved quickly when several developers try to change something, is a very important part. It's so frustrating if your voice is ignored, especially when you have the whole team behind you. So if the goal is writing software and you really want to do it in time with a certain quality, every project definitly needs happy developers. <br /><br />For all of you who don't like those "mandatory no result meetings", have you ever heard of the <a href="http://java.dzone.com/articles/60-second-agility-roti">ROTI Meeting</a>? <br />The following part is just an extract from the link above, so if you want to read more about it, follow the link.<br /><br />After every meeting, on the way out the door, draw a diagonal line on the whiteboard with the labels 0, 2, and 4.<br />Each person in turn gives a number on how the meeting performed as a "Return on Time Invested" and the person with the marker draws in the rating. Here is the rating scale we used:<br /><br />0 = "I'd have been better off making a Starbuck's run. Complete waste of time"<br />1 = "You really should have let me stay at my desk and code"<br />2 = "This was an OK meeting. About as valuable as if I'd been coding"<br />3 = "Surprisingly, this was more valuable than if I'd been writing code"<br />4 = "Wow, this meeting saved me tons of time. Thank goodness I didn't skip it to code"<br /><br />Are you asking yourself about the benefit. It's about retrospective, optimizing your productivity and keeping the motivation at a good level. I am a big supporter of retrospective and I can handle criticism (as long as it is goal-oriented), so I would give the ROTI Meeting a try. What do you think?Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-42507803939500889022009-12-28T17:22:00.049+01:002009-12-29T00:27:20.310+01:00High-Tech Hello again,<br /><br />Since I am somehow related to Sweden I travel to this country regularly.<br />Every time I go there I am astonished by the wide spread technological progress and its common use in every day life. Not only young people are using new technologies, but also grandmas, or grandpas!<br />To give you some examples.<br /><br /><span style="font-weight:bold;">Number 1: In the supermarket:</span><br />At <a href="http://en.wikipedia.org/wiki/ICA_AB">ICA</a>, the largest retail company in the Nordic countries, you can chose between paying your food the normal way (shopping cart, scanning, checkout) <span style="font-weight:bold;">OR</span> with a self scanning service. See the following video.<br /> <br /><object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/doeMpMB0kmo&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/doeMpMB0kmo&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object><br /><br />After you chose all of your things you have to go to one of those machines and pay: By the way, I didn't have any problems scanning the goods. And yes, you can cheat, but the Swedes are honest people.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_LKE1qCn8dy4/Szjj_zd3eWI/AAAAAAAAAFQ/WyikZQbKNRs/s1600-h/IMG_2698.jpg"><img style="cursor:pointer; cursor:hand;width: 150px; height: 200px;" src="http://1.bp.blogspot.com/_LKE1qCn8dy4/Szjj_zd3eWI/AAAAAAAAAFQ/WyikZQbKNRs/s200/IMG_2698.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5420332836827134306" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_LKE1qCn8dy4/Szjlfc4AjxI/AAAAAAAAAFY/OX_lmqKQM58/s1600-h/IMG_2699.jpg"><img style="cursor:pointer; cursor:hand;width: 150px; height: 200px;" src="http://4.bp.blogspot.com/_LKE1qCn8dy4/Szjlfc4AjxI/AAAAAAAAAFY/OX_lmqKQM58/s200/IMG_2699.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5420334480030207762" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_LKE1qCn8dy4/Szjjf6NRIZI/AAAAAAAAAFI/SEIHfClqQBQ/s1600-h/IMG_2704.jpg"><img style="cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_LKE1qCn8dy4/Szjjf6NRIZI/AAAAAAAAAFI/SEIHfClqQBQ/s200/IMG_2704.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5420332288880746898" /></a><br /><br /><br /><span style="font-weight:bold;">Number 2: Virtual bus ticket (SMS) </span><br />If you want to purchase a bus ticket in a city in Sweden, you can send a text message to obtain your virtual ticket. After you receive the message (your ticket) you have to show it to the bus driver.<br /><br /><img src="http://www.dn.se/polopoly_fs/1.562329.1233993235!image/782722408.jpg"/><br /><a href="http://www.sl.se/templates/Page.aspx?id=4920"></a><a href="http://www.sweden.se/eng/Home/Lifestyle/Reading/Sweden-leads-text-messaging-market/">There's also a nice article about this topic.</a><br /><br /><br /><span style="font-weight:bold;">Number 3: Facebook usage</span><br />Another amazing thing is the fact that in Sweden even grandmas have facebook accounts. They sometimes use facebook to invite their grandchildren for "fika" (the swedish word for coffee break). Unbeliveable! I have problems explaining my dad the difference between SMS, CD, DVD and Email :)<br /><br />Last but not least, for all the statistics lovers, visit <a href="http://www.scb.se/Pages/Product____15280.aspx">this link </a><br />For all the developers out there, the next possibility for a visit to sweden will be on March 16-17, at the Scandinavian Developer Conference 2010. By the way, the Swedes speak English very well, so there are no language barriers not to visit this country :)<br /><br />Hälsningar/Greetings (from Sweden)<br />DanielDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-28018084832342819112009-12-23T19:18:00.057+01:002010-01-23T12:23:33.521+01:00Java EE 6 - CDI (JSR 299) - my first impressionsHi there!<br /><br />After taking some time to go through various documents (see link list below) and do some coding samples about the topic CDI, the following things came into my mind:<br />"lots of annotations", "very abstract specification", "what role will CDI play in JavaEE within the next years?", "can become quite powerful", "I need some best practices".<br /><br />The specification of CDI (CDI stands for Context and Dependency Injection) with its 92 pages is in my opinion not the right place to start if you want to learn CDI. It is an abstract specification, which shows all the elements a CDI capable container must implement. I really like the specification, but as the code samples didn't really help me (due to missing explanations), I think it is just not the best place to start. <br />Weld, the reference CDI implementation, offers a great documentation (see link below).<br />By the way, there are other implementations, too: <a href="http://www.caucho.com/resin/">Resin Candi </a>and <a href="http://incubator.apache.org/projects/openwebbeans.html">Apache Open Web Beans</a>.<br />If you use Glassfish V3, Weld is included and if you develop using the WebProfile (see earlier post), Weld is even included.<br /><br />But what is CDi all about? <span style="font-weight:bold;">CDI offers</span>..<br />- an improved <span style="font-weight:bold;">lifecycle</span> for stateful objects, bound to well-defined contexts<br />- a typesafe approach to <span style="font-style:italic;">dependency injection<span style="font-weight:bold;"></span></span><br />- object interaction via an<span style="font-weight:bold;"> event notification</span> facility<br />- a better approach to binding <span style="font-weight:bold;">interceptors</span> to objects, along with a new kind of interceptor, called a <span style="font-weight:bold;">decorator</span>, that is more appropriate for use in solving business problems<br />- an SPI for developing portable extensions to the container.<br /><br /><span style="font-weight:bold;">Gavin King</span> mentioned in the interview:<br /><span style="font-style:italic;">Originally JSR 299 was called Web Beans, to emphasize its role in making the web technologies of Java EE 6 work better with the transactional access technologies. Originally, one of the key problems we wanted to solve was how can we build an application that uses JSF very easily together with technologies like EJB. So it was originally called Web Beans...It over‑emphasized that this was a web technology, when if you actually look at CDI, it's actually something much more general than that. So after much discussion, the name of the spec ended up being changed to “Context and Dependency Injection."</span><br /><br />One of the main buzz words is <span style="font-weight:bold;">(Managed) Bean</span>. We have been using beans in Java a lot before. There are Enterprise Java Beans, Message Driven Beans or JSF managed beans. Now, in JavaEE 6 the word bean finally gets a well defined definition. <br /><span style="font-weight:bold;">Managed Beans are defined as container managed objects which support a small set of basic services, such as resource injection, lifecycle callbacks and interceptors</span><br />With very few exceptions, <span style="font-weight:bold;">almost every concrete Java class</span> (also known as pojo) <span style="font-weight:bold;">that has a constructor with no parameters</span> (or a constructor designated with the annotation @Inject) <span style="font-weight:bold;">is a bean</span>. This includes every JavaBean and every EJB session bean.<br /><br />To give you a short impression about what a Managed Bean can look like see my BeyonceBean :)<br /><pre name="code" class="java"><br />@Named<br />@SessionScoped<br />public class BeyonceBean implements Serializable {<br /> <br /> @PrivateMusicLabel<br /> @Inject<br /> private Label label;<br /><br /> @Produces<br /> @Named(value = "singBeyonce")<br /> public String singBeyonce() {<br /> return "Everywhere I am looking now, I am surrounded by your embrace...Halo Halo Halo";<br /> }<br /><br /> public String getInjectedMusicLabelInfo() {<br /> return label.toString();<br /> }<br />}<br /></pre><br />If you want to learn CDI you should stick to the Weld Documentation provided by JBoss. There are many well described code samples. Maybe this code sample explains what first came into my mind: " <span style="font-weight:bold;">lots of annotations</span>" . I am sure it'll take some time to get used to this way of Java enterprise coding. With CDI you really focus on creating/using lots of annotations, either for type safety reasons, for interceptors or decorators.<br /><font color="red"><span style="font-weight:bold;">UPDATE 01-23-2010</span></font><br />Reza Rahman, a Resin team member, provides some perfect articles for CDI beginners. I really like the way he explains the CDI features. So <a href="http://www.theserverside.com/tt/articles/article.tss?l=DependencyInjectioninJavaEE6">this link</a> might be a perfect if you are new to CDI. <br /><br />Another reflection I would like to share with you is my CDI experience with <span style="font-weight:bold;">Netbeans 6.8 and Glassfish V3.</span><br />- If you don't annotate your Bean with @ManagedBean you don't get the JSF code completion feature. This is very inconvenient. But I am sure the Netbeans developers and community will provide a solution soon.<br />However, there is actually a more general problem with the @ManagedBeanAnnotation. The article <a href="http://weblogs.java.net/blog/cayhorstmann/archive/2009/12/23/javaxfacesbeanmanagedbean-dead-arrival">Is @javax.faces.bean.ManagedBean Dead on Arrival?</a>. describes that there are 3 different ways in JavaEE6 of how to define a ManagedBean in the source code: with JSR 316,250/JEE6Spec,AnnotationSpec javax.annotation.ManagedBean, with JSR 314/JSF2Spec javax.faces.bean.ManagedBean and with JSR299/CDISpec javax.inject.Named. So which one should we use? Use the @Named annotation!<br />- Then I had some problems with the Deploy on Save. When I changed the scope of the bean from request to session, I had to do a clean, otherwise I got a deployment error <span style="font-style:italic;">"Managed bean declaring a passivating scope must be passivation capable" -- which means must implement serializable</span> (even though I added the Serializable interface).<br />I am going to take a closer look at this and see if there already are some open issues. Otherwise I will submit this problem.<br /><br /><span style="font-weight:bold;">My conclusion:</span><br />As I haven't figured out the full capacity of CDI and as it seems to have the power to change the way of writing Java EE applications essentially (or may even become the new JEE6 core programming model), I am very interested in CDI and I will continue reading about it.. As soon as ICEFaces 2.0 will be released I will update my training application from JavaEE5 to EE6 and focus on applying CDI features. As I will have to wait for at least another month I will keep an eye on how CDI is evolving.<br /><br /><span style="font-weight:bold;">Here are the links:</span><br />Specification - <a href="http://jcp.org/aboutJava/communityprocess/final/jsr299/index.html">JCP 299 CDI</a><br />Weld documentation - <a href="http://docs.jboss.org/weld/reference/1.0.0/en-US/html/1.html">JBOSS about CDI</a><br />Gavin King on CDI - <a href="http://java.dzone.com/videos/gavin-king-jsr299">tech discussion @ javalobby</a><br />CDI capable servers and deployment - <a href="http://docs.jboss.org/weld/reference/1.0.0/en-US/html/environments.html">see here</a><br /><br /><font color="red"><span style="font-weight:bold;">UPDATED 01-20-2010:</span></font><br /><a href="http://www.javapassion.com/handsonlabs/javaee6_injection/#Homework">Java EE 6 Codecamp</a> - Here you can do some CDI homework examples. A great way to learn Java EE.Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com3tag:blogger.com,1999:blog-4665641914426597266.post-22222777967642726112009-12-19T16:33:00.025+01:002009-12-26T22:54:08.250+01:00Java EE 6 - The WebProfileHi guys, <br /><br />Within the next few weeks/months I will write about the new Java EE6 components.<br />The first new feature I am focussing on is the so called WebProfile.<br /><span style="font-style:italic;">The Web Profile is targeted at developers of modern web applications.</span><br />Within the last years developing web applications has become more and more important. However, there has also been a large number of technologies for the creation of web applications. All of them had to face similar challenges, like security handling, persitence or transaction handling. <span style="font-weight:bold;">The WebProfile aims at defining a basic stack for developing web applications using the Java platform</span>.<br /><br />The following technologies are required components of the Web Profile:<br />•Servlet 3.0<br />•JavaServer Pages (JSP) 2.2<br />•Expression Language (EL) 2.2<br />•Debugging Support for Other Languages (JSR-45) 1.0<br />•Standard Tag Library for JavaServer Pages (JSTL) 1.2<br />•JavaServer Faces (JSF) 2.0<br />•Common Annotations for Java Platform (JSR-250) 1.1<br />•Enterprise JavaBeans (EJB) 3.1 Lite<br />•Java Transaction API (JTA) 1.1<br />•Java Persistence API (JPA) 2.0<br />•Context and Dependency Injection (JSR-299)<br /><br />The maven repository offers the following jar for the WebProfile<br /><a href="http://download.java.net/maven/2/javax/javaee-web-api/">(see maven repository url)</a>.<br />Include it into your pom like this:<br /> <pre name="code" class="java"><br /><repositories><br /> <repository><br /> <id>java.net2</id><br /> <name>Repository hosting the jee6 artifacts</name><br /> <url>http://download.java.net/maven/2</url><br /> </repository><br /></repositories> <br /><dependencies><br /> <dependency><br /> <groupId>javax</groupId><br /> <artifactId>javaee-web-api</artifactId><br /> <version>6.0</version><br /> <scope>provided</scope><br /> </dependency><br /></dependencies><br /></pre><br />If you chose Netbeans 6.8 as your development environment you can create a maven built web project. In the project properties within the run menu you can switch between the different profiles (full and web). <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_LKE1qCn8dy4/Sy0_oMZ8_NI/AAAAAAAAAFA/t2C6Mf8sOf4/s1600-h/ishot-35.jpg"><img style="cursor:pointer; cursor:hand;width: 320px; height: 88px;" src="http://4.bp.blogspot.com/_LKE1qCn8dy4/Sy0_oMZ8_NI/AAAAAAAAAFA/t2C6Mf8sOf4/s320/ishot-35.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5417055886553971922" /></a><br />After switching you see the difference in the libraries (the full profile uses the javaee-api-6.0.jar).<br /><br />The Java EE6 reference implementation <span style="font-weight:bold;">Glassfish V3</span>, based on OSGI, allows the dynamic addition of new functionality both from Sun and third parties. Glassfish V3 offers both <a href="http://java.sun.com/javaee/downloads/index.jsp">the Full JavaEE profile and the new WebProfile</a>.<br />Based on internal Sun benchmarks, Sun GlassFish Enterprise Server v3 startup times are over twice as fast as v2 and in the case of the Web Profile offering, nearly three times faster.<br />The following glassfish page gives you <a href="https://glassfish.dev.java.net/downloads/v3-final.html">a perfect overview</a> between what is included in the Web Profile and in the Full Java EE Profile. <br /><br /><br />I really love the new WebProfile. Not only because of the performance boost, but also because of the simplified packaging (No EAR packaging needed anymore). So if you don't depend on JMS or remote EJBs, the new WebProfile is what you were looking for as a web developer. Give it a try.Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-61001279948420338472009-12-13T23:31:00.009+01:002009-12-29T08:36:39.264+01:00Java EE 6 - The OverviewHi altogether,<br /><br />While enjoying my christmas holidays in Sweden I have enough time to look at some of the new features Java EE 6 offers.<br />Here's the overview:<br /><br />- JavaTM Platform, Enterprise Edition 6 (Java EE 6) Specification, JSR 316<br />- Contexts and Dependency Injection for the Java EE Platform (CDI), JSR 299 <br />- Enterprise JavaBeans 3.1 (No Interface, Singelton, asynchronous EJBs vs MDBs, Timer), JSR 318<br />- Java API for RESTful Web Services (JAX-RS), JSR 311 <br />- JPA 2.0 (Support for Pessimistic Locking), JSR 317<br />- Dependency Injection for Java, JSR 330: <br />- Bean Validation, JSR 303 <br />- Servlet 3.0, JSR 315<br />- JSF 2.0, JSR 314<br />- new Deployment possibilities<br />- improved/simplified testing<br /><br />Right now I am focussing on CDI (JSR 299), which is a pretty big new part in Java EE 6. It'll take some time to summarize. In the meantime, I hope you're enjoying your free days over christmas.<br /><br />So God Jul, Merry Christmas, Frohe Weihnacht, Feliz navidad, Joyeux Noël! or if you need some <a href="http://www.babelmaster.de/uebersetzung_frohe_weihnachten.html">more translations...</a>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-33713395153013055842009-12-13T10:26:00.013+01:002009-12-13T11:11:40.916+01:00So JavaEE 6 and Glassfish V3 are ready to rock!Hi guys,<br /><br />I want to tell you my first experiences with JavaEE 6 and Glassfish V3.<br />By the way, I favor Netbeans over Eclipse because of the great JavaEE wizards and maven integration (Netbeans Version 6.8 was released on the same day as Glassfish V3)<br /><br />The first thing I did was trying to deploy my JavaEE 5 application on glassfish V3. BUT, not as an EAR project, but as a Web Project.<br />I really like the fact, that you don't necessarily need the EAR packaging. If you put your packaged EJB Content (xxx.jar) into the folder WEB-INF/lib of your WebProject, Glassfish automatically recognizes that your application contains EJBs. The same if have JPA Entities.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_LKE1qCn8dy4/SyS2-bjqgAI/AAAAAAAAAEs/72YFza7YcZg/s1600-h/ishot-31.jpg"><img style="cursor:pointer; cursor:hand;width: 320px; height: 66px;" src="http://2.bp.blogspot.com/_LKE1qCn8dy4/SyS2-bjqgAI/AAAAAAAAAEs/72YFza7YcZg/s320/ishot-31.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5414653835671666690" /></a><br /><br />One of the biggest benefits I get from using only the WAR file is the great deployment time and the Deploy on Save functionality. There are still problems with Netbeans if you want to use the deploy on save feature with maven built javaEE projects. (Ear, War, EJB), <a href="http://netbeans.org/bugzilla/show_bug.cgi?id=157093">see this post</a>. But with only one war file all the changes you do to your web project will be deployed automatically. You just have to turn on the Deploy on Save within the Projects Properties .<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_LKE1qCn8dy4/SyS8W7oM8tI/AAAAAAAAAE0/j_YCEyPx7AU/s1600-h/ishot-33.jpg"><img style="cursor:pointer; cursor:hand;width: 320px; height: 171px;" src="http://2.bp.blogspot.com/_LKE1qCn8dy4/SyS8W7oM8tI/AAAAAAAAAE0/j_YCEyPx7AU/s320/ishot-33.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5414659754155635410" /></a><br /><br />Starting GlassFish V3 and deploying my application on my MacBook Pro takes about 19 seconds:<br />INFO: GlassFish v3 (74.2) startup time : Felix(3459ms) startup services(15633ms) total(19092ms)<br />Once started the redeployment due to deploy on save is so fast, i don't event see netbeans redeployment status window in the corner down right. :)<br />So to make my application be JavaEE 6 compatible I also had to do some changes on the Web Project itself. I had to update the web.xml and I moved the configuration within the faces-config.xml into the beans itself by using the following annotations:<br />@ManagedBean(name = "Login")<br />@RequestScoped<br /><br />But as I use ICEFaces and ICESoft hasn't released the final JSF2.0 compatible version I still have to wait until I can benefit from this great perfomance boost, JavaEE6 will bring. There is a <a href="http://blog.icefaces.org/blojsom/blog/default/2009/12/10/GlassFish-v3-and-ICEfaces-2-0/">alpha release of ICEFaces V2.0 </a>however, there's too much things to fix if you want to make it work. If you are interested in the latest problems <a href="http://www.icefaces.org/JForum/posts/list/15/15179.page">see this post.</a><br /><br />So this was just my first impression on JavaEE6 and glassfish. I will tell you more about the new features of JavaEE as soon as ICEFaces 2.0 is released. <br />Greetings and have a nice day!Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-13896890052835952622009-12-10T00:11:00.004+01:002009-12-10T00:25:11.025+01:00Waiting for JavaEE 6Hi alltogether,<br /><br />After the approval of the <a href="http://jcp.org/en/jsr/detail?id=316">Java Enterprise Edition 6 (Java EE 6) Specification</a> we are very close to the final release.<br />Roberto Chinnici writes in his <a href="http://weblogs.java.net/blog/robc/archive/2009/12/01/java-ee-6-platform-approved-today"> blog </a> that the release date will be december 10, 2009, when Glassfish V3 will be available.<br />I am really looking forward to these releases. However, as a user of the ICEFaces Framework, I still have to wait until ICEFaces 2.0 is going to be released. ICEFaces 2.0 will be the JSF2.0 compatible version. Right now there's only a <a href="http://blog.icefaces.org/blojsom/blog/default/2009/10/30/ICEfaces-2-0-Alpha-1-is-out/">alpha version</a> available.<br /><br />So, if you like to read more about the new features of JavaEE6 and Glassfish V3, check out the following links:<br />- <a href="http://java.sun.com/javaee/technologies/javaee6.jsp">JavaEE6 @Sun</a><br />- <a href="http://wiki.glassfish.java.net/Wiki.jsp?page=PlanForGlassFishV3">GlassFish V3</a>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-15524350346167555542009-11-30T22:22:00.011+01:002009-12-01T00:33:24.857+01:00Netbeans 6.8 Release Candidate 1 - my first impressionHi there,<br /><br />from now on you can download the release candidate 1 for Netbeans 6.8. <a href="http://download.netbeans.org/netbeans/6.8/rc/">download it here</a><br />For those who don't know anything about the build types for Netbeans releases here are the possible enums :)<br />- Milestone<br />- Early Access<br />- Beta<br />- Release Candidate<br />- Release<br /><br />I was very curious about this release candidate. The most important feature I am missing / waiting for is the Compile on Save feature for Maven Java EE Projects <a href="http://netbeans.org/bugzilla/show_bug.cgi?id=157093">(vote for it here)</a> However, this feature hasn't been implemented yet. In my opinion, this is a must have feature if you develop javaEE projects with maven and netbeans. So hopefully it will be implemented in the 6.8 release version. Let's wait and see.<br /><br />Another problem I faced with Netbeans 6.8 M2 was the very frequent Glassfish PermGen Out of memory exception. I've been getting it whenever I published too often (means after about 20 deployments of the ear project within an hour). <br />While working with this release candidate for the last hour this OutOfMemory Glassfish problem hasn't occured. Good news.<br /><br />Another problem also vanished. Netbeans sometimes crashed when I was trying to insert jsf value binding in xhtml files.<br /><br />All in all the Netbeans developers are doing a great work. Keep on developing!!! Thanks a lot for this great IDE.Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-2507203442704290022009-11-15T11:51:00.007+01:002009-11-25T23:03:06.686+01:00Netbeans 6.8beta, Glassfish V2.1, EJB 3.0 Deployment ProblemsHi alltogether,<br />Within the last few weeks I sometimes had to face with the following exception, which appeared out of nothing.<br /><br />Exception occured in J2EEC Phasejava.lang.IllegalArgumentException: Invalid ejb jar [...EJB-1.1-SNAPSHOT.jar]: it contains zero ejb. <br />Note: <br />1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean. <br />2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. <br />3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven), please check server.log to see whether the annotations were processed properly.<br /><br />At first, I thought it was a problem with changing the snapshot version <a href="http://daniel-noz.blogspot.com/2009/11/netbeans-maven-javaee-new-snapshot.html">(see this post)</a>) but this actually wasn't the problem. Maybe, it's a problem of Netbeans 6.8beta version. Anyway, I still haven't figured out the source of the problem, I can only tell you what you have to do to make it work again. Recreate your glassfish domain. <a href="http://docs.sun.com/app/docs/doc/820-4497/create-domain-1?a=view"> Here is a how to link </a><br /><br />I hope this is helpful for you. It took me some hours to fix the problem, which was very annoying.Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-20589514990693529632009-11-01T09:39:00.004+01:002009-11-01T09:46:30.381+01:00ICEFaces meets JSF2.0Hello again,<br /><br />As I have been developing most of my applications with ICEFaces as JSF implementation, I am very curious to test the first version of ICEFaces 2.0 Alpha. The ICEFaces core is now on the Mojarra JSF 2.0.1 runtime.<br />Read more about it<br /><a href="http://blog.icefaces.org/blojsom/blog/default/2009/10/30/ICEfaces-2-0-Alpha-1-is-out/"> http://blog.icefaces.org/blojsom/blog/default/2009/10/30/ICEfaces-2-0-Alpha-1-is-out </a><br />As soon as I migrated from 1.8.2 to this Alpha version, I will tell you my experiences.Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-43790047954831351062009-11-01T00:32:00.006+01:002009-11-01T09:02:13.211+01:00Netbeans, Maven, JavaEE, new snapshot version problemHi guys,<br />instead of celebrating Halloween I struggled with a problem building my maven based javaEE Trainer application in Netbeans 6.7.1. A few minutes ago, I finally found out what was wrong. The problem I am telling you took me about 3 hours to fix...grrrr<br /><br /><span style="font-weight:bold;">So, what was the problem?</span><br />I have an Ear project, consisting of a web project, an ejb project and a jar project, all maven projects created with Netbeans.<br />When I changed the IceFaces Libraries of the web project I also updated all of the projects pom.xml files, as I created a new snapshot version.<br />From this point on, I wasn't able to deploy/publish the application anymore! The error message I received was: <span style="font-weight:bold;">invalid ejb jar it contains zero ejb</span><br /><br /><blockquote>1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or<br />message driven bean. <br />2. EJB3+ entity beans (@Entity) are POJOs and please package them as library<br />jar. <br />3. If the jar file contains valid EJBs which are annotated with EJB component<br />level annotations (@Stateless, @Stateful, @MessageDriven), please check<br />server.log to see whether the annotations were processed properly.</blockquote><br /><br />The problem was, that I forgot updating the application.xml within the EAR project. In it, I was still using the older snapshot version of the EJB project. So in my projects target folder, the gfdeploy folder had both the older and the latest snapshot version, which made publishing to glassfish impossible. <span style="font-weight:bold;">So never forget to update both your poms and your applicationx.xml, if you are creating a new snaphot version</span>!<br /><br />Enjoy your weekend!<br />DanielDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-9490683865706737632009-10-23T19:27:00.006+02:002009-10-23T20:14:08.108+02:00It has been quite a while...I has been quite a long time since I have published the last blog post.<br />As I did a few things I now have to think back what I actually did...:)<br />First of all, while developing my basketball application (see <a href="http://daniel-noz.blogspot.com/2009/08/which-web-application-framework-do-you.html"></a>) and working for my current customer I got the idea to write an article about best practices in agile software development, which was pretty tough, what I can say right now, because I finally completed it last week. However, it will take some months until it gets published. I will tell you more about it as soon as I have more information.<br /><br />What about my basketball application? <br />My goal is to release a snapshot version 1 just before christmas :)<br />I set up the perfect infrastructure for the application with hudson and sonar and created the first few web pages. By the way, IceFaces won the race for the web framework. Whether I am happy with this choice or not... I don't know. I definitly had to deal with some basic JSF understanding problems, as I am no UI guy. But with the help of some colleagues I could fight my way through the UI jungle and I am happy to say, that the application is on stable ground and ready to be filled with more and more functionality. There's only one problem. I don't really like to develop web content. Apparently I am not getting comfortable with this xhtml code.<br />Before I decided to choose IceFaces, I also evaluated Adobe Flex in combination with JavaEE. But I broke up with it because it would have been way more work for me to get used to developing Adobe Applications.<br /><br />Within the next weeks I will focus on posting more about my experiences with the development of my basketball application and because of the article I wrote, I will post some news and experiences about agile, test driven development.<br /><br />That's all for today, have a great weekend.<br />DanielDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-33359710415434799272009-08-28T16:22:00.025+02:002009-09-08T21:14:06.388+02:00Netbeans 6.7.1, Maven WebApp with IceFaces 1.8.1 - a setup guideHi guys, <br />the last few days I had some problems setting up the web part for my upcoming application.<br />As I know that some of you guys stumbled upon my blog because you were looking for ICE Faces 1.8.x integration, I thought it would be useful to post my 'set up configuration'.<br />I am using Netbeans 6.7.1 with Maven 2.2.0 and IceFaces 1.8.1 and glassfish V3 prelude.<br />Let's start with the <span style="font-weight:bold;">faces-config.xml</span>, where you have to add the ICEfaces specific view handler<br /><pre name="code" class="java"><br /><?xml version='1.0' encoding='UTF-8'?><br /><faces-config version="1.2"<br /> xmlns="http://java.sun.com/xml/ns/javaee"<br /> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"><br /> <application><br /> <view-handler><br /> <span style="font-weight:bold;">com.icesoft.faces.facelets.D2DFaceletViewHandler</span><br /> </view-handler><br /> </application><br /></faces-config><br /></pre><br />(this page helps you add xml code to your blog: <a href="http://centricle.com/tools/html-entities/">http://centricle.com/tools/html-entities/</a><br /><br />The next important configuration file is the <span style="font-weight:bold;">web.xml</span><br /><pre name="code" class="java"><br /><?xml version="1.0" encoding="UTF-8"?><br /><web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><br /> <display-name>ICEfaces 1.8.1</display-name><br /> <description>web.xml for a icefaces 1.8.1 application</description><br /> <br /> <context-param><br /> <param-name>javax.faces.STATE_SAVING_METHOD</param-name><br /> <param-value>server</param-value><br /> </context-param><br /><span style="font-weight:bold;"> <context-param><br /> <param-name>javax.faces.DEFAULT_SUFFIX</param-name><br /> <param-value>.xhtml</param-value><br /> </context-param></span><br /> <context-param><br /> <param-name>com.icesoft.faces.synchronousUpdate</param-name><br /> <param-value>false</param-value><br /> </context-param><br /> <context-param><br /> <param-name>com.icesoft.faces.concurrentDOMViews</param-name><br /> <param-value>true</param-value><br /> </context-param><br /> <context-param><br /> <param-name>contextConfigLocation</param-name><br /> <param-value>/WEB-INF/applicationContext.xml</param-value><br /> </context-param><br /> <br /> <servlet><br /> <servlet-name>Faces Servlet</servlet-name><br /> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class><br /> <load-on-startup>1</load-on-startup><br /> </servlet><br /> <servlet><br /> <servlet-name>Persistent Faces Servlet</servlet-name><br /> <servlet-class><br />com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet<br /> </servlet-class><br /> <load-on-startup>1</load-on-startup><br /> </servlet><br /> <servlet><br /> <servlet-name>Blocking Servlet</servlet-name><br /> <servlet-class><br />com.icesoft.faces.webapp.xmlhttp.BlockingServlet<br /> </servlet-class><br /> <load-on-startup>1</load-on-startup><br /> </servlet><br /> <br /><span style="font-weight:bold;"> <servlet-mapping><br /> <servlet-name>Persistent Faces Servlet</servlet-name><br /> <url-pattern>*.iface</url-pattern><br /> </servlet-mapping><br /><br /> <servlet-mapping><br /> <servlet-name>Persistent Faces Servlet</servlet-name><br /> <url-pattern>/xmlhttp/*</url-pattern><br /> </servlet-mapping><br /></span><br /><br /> <servlet-mapping><br /> <servlet-name>Blocking Servlet</servlet-name><br /> <url-pattern>/block/*</url-pattern><br /> </servlet-mapping><br /><br /> <session-config><br /> <session-timeout><br /> 30<br /> </session-timeout><br /> </session-config><br /><br /> <welcome-file-list><br /> <welcome-file>justatest.iface</welcome-file><br /> </welcome-file-list><br /><br /> <listener><br /> <listener-class><br />com.sun.faces.config.ConfigureListener<br /> </listener-class><br /> </listener><br /><br /><!-- Listener implementation to handle web application lifecycle<br />events --><br /> <listener><br /> <listener-class><br />com.sun.faces.application.WebappLifecycleListener<br /> </listener-class><br /> </listener><br /> <listener><br /> <listener-class><br />com.icesoft.faces.util.event.servlet.ContextEventRepeater<br /> </listener-class><br /> </listener><br /></web-app><br /></pre><br /><br />I use xhtml files for developing the user interface. If I enter the URL http://...../justatest.iface , the corresponding xhtml file will be rendered and send back to the client. (see the highlighted parts)<br /><br />Last but not least the <span style="font-weight:bold;">maven pom.file</span> for all the required libraries<br /><pre name="code" class="java"><br /><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><br /> <modelVersion>4.0.0</modelVersion><br /> <groupId>yourGroupID</groupId><br /> <artifactId>YourApplicationID</artifactId><br /> <packaging>war</packaging><br /> <version>1.0-SNAPSHOT</version><br /> <name>YourApplicationName</name><br /> <url>http://maven.apache.org</url><br /> <dependencies><br /> <dependency><br /> <groupId>javax.servlet</groupId><br /> <artifactId>servlet-api</artifactId><br /> <version>2.5</version><br /> <scope>provided</scope><br /> </dependency><br /> <dependency><br /> <groupId>junit</groupId><br /> <artifactId>junit</artifactId><br /> <version>4.7</version><br /> <scope>test</scope><br /> </dependency><br /> <dependency><br /> <groupId>javax.servlet</groupId><br /> <artifactId>jstl</artifactId><br /> <version>1.2</version><br /> <scope>runtime</scope><br /> </dependency><br /> <dependency><br /> <groupId>org.icefaces</groupId><br /> <artifactId>icefaces</artifactId><br /> <version>1.8.1</version><br /> </dependency><br /> <dependency><br /> <groupId>org.icefaces</groupId><br /> <artifactId>icefaces-facelets</artifactId><br /> <version>1.8.1</version><br /> </dependency><br /> <dependency><br /> <groupId>org.icefaces</groupId><br /> <artifactId>icefaces-comps</artifactId><br /> <version>1.8.1</version><br /> <exclusions><br /> <exclusion><br /> <artifactId>jxl</artifactId><br /> <groupId>net.sourceforge.jexcelapi</groupId><br /> </exclusion><br /> </exclusions><br /> </dependency><br /> </dependencies><br /> <build><br /> <plugins><br /> <plugin><br /> <groupId>org.apache.maven.plugins</groupId><br /> <artifactId>maven-compiler-plugin</artifactId><br /> <configuration><br /> <source>1.6</source><br /> <target>1.6</target><br /> </configuration><br /> </plugin><br /> </plugins><br /> <finalName>YourApplicationName</finalName><br /> </build><br /></project><br /></pre><br /><br /><br />So, have fun developing with ICEFaces and let me know if this configuration was helpful for you.<br />Greetings DanielDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com4tag:blogger.com,1999:blog-4665641914426597266.post-308022041749885322009-08-11T22:45:00.002+02:002009-08-11T23:08:58.984+02:00Which web application framework do you recommend?Hi guys, <br />it has been quite a long time since I published my last post. Sorry for that. Now that summer has finally arrived in Germany, it seems that every day there is an event after work. So I haven't found much time for developing. But one of my goals for the next few weeks is to release the first version of a Basketball Software, which a friend of mine asked me to do develop. I am not happy with the progress I am making, but my real life projects have a higher priority.<br />Considering this Basketball App, I started setting up the entity model, set up the workspace including a hudson environment (I love hudson, even for a one man project) and wrote the first session beans. I chose EJB3 for the backend part. However, what I haven't decided yet is the front-end part. I have done some projects using different JSF implementations, but I am thinking about whether I should try out something else. Can anyone of you recommend me something? <br />What about JavaFX? How good is the integration with JavaEE?<br />What about Wicket, GWT or Google Gears?<br />I'd love to do an evaluation for all of the implementations. Maybe I ll find some time to create one feature (like the createNewPlayer userInterface) with each of the frameworks. But if anyone out there has already done this evaluation, I would be very grateful.<br />So..as soon as I reached a certain progress level, I will write something about the upcoming application.<br /><br />Have a great day..<br />DanielDanielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-74883463075693369282009-07-28T20:49:00.010+02:002009-07-28T22:00:47.142+02:00JavaEE with RAD 7.5 and WAS7Hi guys,<br /><br />as I promised to post my experiences with RAD7.5 (Rational Application Developer) and WAS7 (Websphere Application Server), I will now show you what I tried to implement during the WAS7 presentation/workshop using the RAD7 wizards and code snippets.<br /><br /><b>STEP1: I created a WebProject<br />STEP2: and added a Servlet</b><br />--> there was <span style="font-weight:bold;">no code skeleton generated</span> for the servlet. Netbeans generates you at least something like this.<br /><pre name="code" class="java"><br />protected void processRequest(HttpServletRequest request, HttpServletResponse response)<br />throws ServletException, IOException {<br /> response.setContentType("text/html;charset=UTF-8");<br /> PrintWriter out = response.getWriter();<br /> try {<br /> /* TODO output your page here<br /> out.println("");<br /> out.println("");<br /> out.println("");<br /> out.println("");<br /> out.println("");<br /> out.println("Servlet Testservlet at " + request.getContextPath ());<br /> out.println("");<br /> out.println("");<br /> */<br /> } finally {<br /> out.close();<br /> }<br />}<br /></pre><b>STEP3: I tried to deploy the WebProject to WAS7</b><div>--> RAD only allows you to deploy EAR files, so if you want to deploy only the war or ejb, you have to use the admin console. Very inconvenient. If you try to use the context menu and select run on server on the web project, you get the following exception:</div><div><i>Could not find a valid parent module to add to the server.</i></div><div><i><br /></i></div><div><b>STEP4: I created a EJB Project</b></div><div><b>STEP5</b>: and <b>added</b> a <b>local</b> <b>stateless session bean</b>, with some hello(String name) implementation</div><div>--> the wizard asks you to create a class diagram, which is a nice feature.</div><div><b>STEP6:</b> I created a <b>EAR project</b> and added the EJB and the WebProject</div><div>S<b>TEP7: Invoke</b> <b>the</b> <b>local stateless session bean from the servlet</b></div><div>--> Of course, I could have coded this feature very easily by just adding the @EJB annotation but I wanted to see what the snippet produces, so I used the <b>snippet</b>: <b>CALL a Session Bean Service method. </b>The snippet wants to create an ejb reference and asks you to select the session bean. I selected my local stateless session bean and <b>received the following error</b>: <i>Remote interface cannot be empty. </i>So RAD tells me I can not invoke a local session bean from servlet where both projects are part of the same EAR? Interesting....</div><div>If I select remote even if the interface doesn't have a remote interface, RAD finally generates something...some code with compile errors...Welcome back to the world of EJB2.1 :) Feoijesfer is the name of the reference I had to enter... :)</div><pre name="code" class="java"><br />protected FeoijesferRemote createFeoijesferRemote() {<br /> = () ServiceLocatorManager.getRemoteHome(STATIC__REF_NAME, STATIC__CLASS);<br />try {<br />if ( != null)<br />return .create();<br />}catch (javax.ejb.CreateException ce) {<br />// TODO Auto-generated catch block<br />ce.printStackTrace();<br />} catch (RemoteException re) {<br />// TODO Auto-generated catch block<br />re.printStackTrace();<br />}return null;<br />}<br /><br />private final static String STATIC__REF_NAME = "ejb/Feoijesfer_2";<br />private final static Class STATIC__CLASS = .class;<br /></pre><br /><div>After this result I didn't want to waste any more time with RAD7.5. Of course it is now possible to create JavaEE applications with IBM products, but don't use the wizards I used. Do it yourself or switch to Netbeans.</div><div><br /></div><div><br /></div>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com1tag:blogger.com,1999:blog-4665641914426597266.post-76928929437125295162009-07-22T21:33:00.016+02:002009-07-22T23:10:02.728+02:00Free Sun webinar: Make Applications Highly Available: Load Balancing GlassFish ClustersHi guys,<div>today I attended at my first SUN webinar. Hopefully it won't be my last one with SUN, because I really liked it. It started very amusing with a hint regarding questions about Oracle. <i>So, if you have questions regarding the Oracle Sun deal, please go to sun.com or oracle.com website. We won't respond on questions about this.</i></div><div><i><br /></i></div><div>John Clingan, the GlassFish Group Product Manager, started this webinar with a presentation of the<b> benefits of open source </b>and keywords like: productivity focus, community and transparency, annual subscriptions, performance tuned and pay at point of value. Then he introduced the <b>Sun GlassFish portfolio</b> at a high level. The Enterprise Server, the Web Space Server (portal for website development and collaborative workspaces), Web Stack (a complete LAMP stack) and Glassfish ESB.</div><div><br /></div><div>The main focus of this <b>1-hour</b> <b>webinar</b> was on <b>High Availability</b> and <b>Load Balancing</b> with GlassFish V2.1. He quickly explained the features of the High Availability Database (HADB) with its 5-9s and the in-memory replication. If you want to have more information, I recommend reading the <a href="http://docs.sun.com/app/docs/doc/820-4341">administration guide</a> or this <a href="http://www.slideshare.net/alexismp/glassfish-v21-1239458">slideshow</a>. After John, Shreedhar Ganapathy continued with his part about Load Balancing. He answered the question why Load Balancing is so important. <i>If you want to meet business SLA's you have to have scalability to address any growth requirement. Fault tolerance is also very important to prevent any service degradation.</i> Later he explained the GlassFish Load Balancing Plugin, which works with SunWebServer, Apache WebServer and Microsoft IIS. </div><div><br /></div><div>Then it was time for the first demo. John showed us how to install <a href="http://www.sun.com/software/products/appsrvr/get_it.jsp">Sun GlassFish Enterprise Server v2.1 with HADB</a> on a Solaris platform. Apparently, it didn't work because of some problems while providing the path of the installed webserver. Therefore, this step was skipped and instead replaced with a demo deployment of a HA JSP Sample Application. The application was deployed on a cluster consisting of 2 instances. It showed us how to keep values in a HTTP session if one instance fails (they stopped one instance manually).</div><div><br /></div><div>The last 10 minutes of the webinar were dedicated to questions: Here are some examples: I asked what makes GlassFish clustering and Load Balancing better than what IBM Websphere offers? Answer: <i>It is much easier to install and support and administer through a centralized UI. In addition, it is the only Open Source App Server that supports 5 9s availability. <span class="Apple-style-span" style="font-style: normal; ">Another question was: What will healthchecking actually do? Check if there are any exceptions thrown? <i>Healthchecking checks, whether instances in a cluster are alive, dead or slow</i>. What is a node agent or what is IIOP or even what is EJB ;) ? There were many different questions. As John couldn't answer all of them, he got support from other experts.</span></i></div><div><br /></div><div>As already mentioned, I really enjoyed this webinar. The skill of the speakers is amazing. You can ask questions to the real GlassFish experts. Of course you can't teach a topic like this in only one hour, but the speakers did a great job in giving an overview. I have to admit that I still have to learn a lot about High Availability and clustered environments. Until now, I didn't care much about this topic as it didn't affect my work as a developer that much. But there's lots of great documentation to read....which I will start with....tomorrow..</div><div><br /></div><span class="Apple-style-span" style="font-family: Arial, Helvetica, FreeSans, Luxi-sans, 'Nimbus Sans L', sans-serif; font-size: 12px; "><div><br /></div></span><div><br /></div><div><br /></div><div><br /></div>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0tag:blogger.com,1999:blog-4665641914426597266.post-24708584269532038612009-07-21T18:54:00.014+02:002009-07-21T22:30:02.625+02:00Introducing Websphere Application Server V7 (or WAS 7 with RAD 7.5)Today I took part at a workshop/introduction of Websphere Application Server V7 in Stuttgart, held by 2 very nice guys from Nice, France. As a convinced glassfish user I was very curious about the first IBM Product, which is completely JavaEE compatible. Version 6.1 with fix packs for EJB or JAX-WS had still some missing things, such as the administration of web services. As I have been working with Websphere in some projects I had lots of critical questions, like what about the bad server start up time or the installation size? But maybe it has become better and they did some improvements since WAS6.1? Let's see what they told us.<div><br /></div><div>I have learned that Websphere is not just an Application Server. It's an ESB, a ProcessServer, an XD, a Portal, a Business Modeler... Great news, but what about the licenses? Is it all included :)</div><div><br /></div><div>The <b>installation</b> of WAS 7 takes about 200-300 Megabyte of your hard disk and a installation time of about 10 Minutes, maybe a bit faster, depending on your machine. If you want to create a profile which takes about 20 MB, you need some additional time for its creation. <span class="Apple-style-span" style="font-style: italic; ">At lunch i asked how it can take up to 10 Minutes for 200 MB???? The speaker told me he has been asking this question since 10 years.. It's unbelievable.. <span class="Apple-style-span" style="font-style: normal; ">WAS7 is installable on Windows and Linux/Unix. But let's be honest. Windows, RedHat and AIX.</span></span></div><div><br /></div><div>With the same <b>license</b> for WAS7 you get a RAD Assembly and Deploy version, which provides basic support for creating JavaEE applications, deployment and testing. You have to pay some extra money if you want to have the RAD for Websphere (Rational Application Developer) where you get extra features like Adapters, Portlets, Crystal Reports, RUP, ReqPro, etc.</div><div><br /></div><div>Then they gave an overview over the new <b>features of JavaEE 5</b>. It was mainly about the changes/improvements between EJB2.1 and EJB3 and JPA. <span class="Apple-style-span" style="font-style: italic; ">They agreed that the release of WAS7 is pretty late, as we are almost about the new release of JavaEE 6 this year.</span></div><div><br /></div><div>The next topic was the <b>first demo</b>. It was about the creation of Jax-WS webservices.</div><div>I looked at the time, as I remembered having had some problems with creating webservices with WAS6.x and RAD7. He started at 10.22 am, created a HelloService POJO, and created a webservices from this pojo with the help of the IDE. Within this menue u can can choose to create a client as well, deploy everything and call the test page. At 10.26 he was done. This was pretty good, as he did some explanation in between. He could have been faster ;) After this he attached a policy set through the admin console, added WS-ReliableMessaging, assigned a binding for it and finally exported it (you could choose between WSDL or WS MetadataExchange). After this, the client was configured, using generated policy. This was a very nice demo.</div><div><br /></div><div>After the demo, they showed us the huge configuration possibilities Websphere provides, like BLAs (I like this expression, Business Level Applications), Filtering Options, Security Settings, Messaging Improvements and Clustering Settings. After lunch they presented <b>the second demo</b>. Also a very nice one. They created a clustered environment with two laptops and two nodes. Then we finally had time on our own to do some labs, which were prepared for us. I took the time for developing some servlets, jsf pages and ejbs, which weren't part of the lab. More about my experiences in the next post.</div><div><br /></div><div>So, what about <b>my summary</b>?</div><div>I was really impressed by the skill of the 2 speakers. I wasn't sure whether it would be a pure marketing event or not? And it was a very technical event, which I really liked. I see that Websphere has its strength in it's admin console, where you can configure like almost everything. They have a strong focus on security and clustering issues and they don't care much about start up time or deployment time. If everything is configured well and you have a well clustered environment, you will have a good running environment in the end. But I am not sure if they focused on how to get there. Server start up time or redeployments is what a developer does every day, and there you have other applications where you can develop much faster. In my opinion, a developer will definitely be happier with Netbeans and glassfish.</div><div><br /></div>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com2tag:blogger.com,1999:blog-4665641914426597266.post-63724940428704840942009-07-17T23:16:00.004+02:002009-07-17T23:41:42.861+02:00ICEfaces-1.8.1 AND NetBeans-6.7Hi guys, <div>for all of you who developed web applications using <a href="http://www.icefaces.org">ICEfaces</a> with Netbeans 6.5.1 and now switched to Netbeans 6.7, you will no longer find the ICE Faces Plugin within 'Plugins - Available Plugins'</div><div>Instead you have to download it manually from <a href="http://www.icefaces.org/main/downloads/">http://www.icefaces.org/main/downloads/</a></div><div>After downloading go to Netbeans>Plugins>Downloaded>Add Plugins...></div><div>Select both org-icefaces-netbeans-modules-lib.nbm and</div><div><b> </b>org-icefaces-netbeans-modules-web-frameworks.nbm</div><div>The first one provides the run-time-libraries whereas the second one is for the netbeans project integration. </div><div>And if you are now about to create a new WebProject, Select ICEfaces and under ICEfacesConfiguration, you can now make Netbeans create a welcomeICEfaces.xhmtl (Facelets only). You should focus on using Facelets, as jsp will probably vanish with JSF2.0</div><div><br /></div><div>So have fun!</div><div><br /></div><div>For those who don't know <a href="http://www.icefaces.org">ICEfaces</a> (I really love this name..sounds pretty cool :) )</div><div>ICEfaces is an open-source Ajax application framework that enables JSF application developers to easily create and deploy thin-client rich Internet applications (RIA) in pure Java. </div>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com2tag:blogger.com,1999:blog-4665641914426597266.post-41796168620629264912009-07-13T21:43:00.004+02:002009-07-13T22:11:48.136+02:00Netbeans IDE 6.7 RefcardHi guys,<br />for those of you who don't know Netbeans development environment, there's a nice DZONE refcard available at<br /><a href="http://refcardz.dzone.com/">http://refcardz.dzone.com/</a><br />It gives you a very general overview about<br /><div><ul><li>What are the buttons for?</li><li>What does the editor look like?</li><li>What's new compared to the version before?</li><li>Some shortcuts for both PC and Mac users</li><li>and last but not least a list of links</li></ul><div>My recommendation is just to download it from <a href="www.netbeans.org">www.netbeans.org</a> and test the features.</div><div>I switched from Eclipse to Netbeans about 2 years ago and I am completely happy with it.</div><div>What I like most is that this IDE gets better and better with every release, even with release candidates or master releases. I think the main difference between Eclipse and Netbeans is, that Netbeans focuses on providing the very basic functionality for a developer. It is very well tested and has a great integration with databases and application servers.</div><div>Eclipse, on the other hand, is more configurable and open for a lot of different plugins. The different download bundles indicate this. </div><div>I have met developers, who did a bit too much of eclipse customizing, which made their workspace get lots of problems at deploying and even compiling.</div><div>Netbeans also offers different bundles, but it's not about basic IDE features which differ, but support for other programming languages, such as PHP, groovy, C++ and some more.</div><div><br /></div><div>I think there are different kind of developers, those who are happy with things that just work, and those who really love to customize and therefor accept some problems. Maybe comparable with MAC and PC discussions.</div><div>So feel free to tell me your opinion about your favorite IDE.</div><div><br /></div></div>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com2tag:blogger.com,1999:blog-4665641914426597266.post-34023487222110551022009-07-10T19:19:00.004+02:002009-07-10T19:58:32.407+02:00Top Reasons for Glassfish V3I have seen so many large Java projects where they used WebSphere Application Server. <div>Is there a link between the size of a project and the heavyweight of an application server?</div><div>The more people that are developing - the longer the server-start-time or deployment time?</div><div><br /></div><div>Development Roundtrips beginning with cleaning up your workspace, rebuilding and redeploying your application can take more than 5 minutes, even if you just want to see some changes on the front end.</div><div><br /></div><div>Switching between implementing with Glassfish and Websphere makes me feel like living in two different worlds. Future and Past.</div><div>However, I see that it is still difficult to convince a company or the decision makers, to use glassfish. Many times these decisions are not made for the developers sake and though for the success of a project. But if you are one who can choose the application server, consider these benefits, written down in the following <a href="http://blogs.sun.com/alexismp/entry/lightweight_glassfish">blog</a>:</div><div>I know, Glassfish V3 is not yet ready for productive use, but i also know how long it takes to make a decision :)</div><div><br /></div><div><br /></div>Danielhttp://www.blogger.com/profile/16758258727851863276noreply@blogger.com0