Denis Zjukow

Ranch Hand
+ Follow
since Mar 15, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Denis Zjukow

Thanks Karl,

AwsHandlerResolver works fine!
12 years ago
I use Eclipse Europa and it does have support for EJB projects. However, by default it uses the following structure:



This structure is different from the default maven layout which looks like this:



The question is, how to setup Eclipse project properties so that Eclipse would understand maven layout. For a WAR project I use "mvn eclipse:eclipse -Dwtpversion=1.5" and it works fine, Eclipse perfectly understands maven layout. But, unfortunately, this does not work for an EJB project.

Any ideas?
Hi,

I am trying to find a way how to use the following three things together:

1) Eclipse - I want to use Eclipse WTP for development;
2) EJB 3 - I need EJB 3 in my project;
3) Manven 2 - I want to use Maven 2 as a build tool.

My question: is it possible to adjust an EJB project in Eclipse so that it would use maven layout and the project was a "real" EJB project (in Eclipse sense). The last requirement is important because I find hot replace very useful (I don't want to build my application manually every time I change it).

I want to have three projects in my Eclipse workspace: WAR, EJB and EAR. I use "mvn eclipse:eclipse" tool to generate metadata for WAR and EAR. It seems to work fine. However, this approach doesn't work for EJB.

If you know the solution, please, describe it or provide a link.

Thank you!
Zack, thanks for reply. The thing is that in my example class MyBean is managed by the container. And so is AbstractParentBean, as it is a "part" of MyBean. So I don't understand why the container doesn't call the init() method. In my opinion, there is no reason not to call it.
14 years ago
JSF
Hello. Is it possible to use @PostConstruct annotation on a non-abstract method of an abstract class? In our application the annotation works perfectly if is placed on a method of a managed bean. But it doesn't work if I pull it up in the class hierarchy. For example:



In this example method AbstractParentBean.init() is not invoked despite the fact it is marked with @PostConstruct. Is it incorrect to put @PostConstruct annotation on a parent class (abstract or non-abstract)?
14 years ago
JSF
Actually, I found what was my problem with EJB project (Eclipse threw an IndexOutOfBoundsException after I tried to deploy my EAR module containing an EJB module). As a matter of fact, I generate project settings using Maven Eclipse Plugin. It turned out, there is an open issue (MECLIPSE-196) in Maven 2 Plugin JIRA. However, the defect is not fixed yet. There is some mysterious workaround, unfortunately, I am not an expert in Eclipse development, so I haven't managed to apply the described solution on my machine. If anyone faced this problem and found a way to solve it, please share your knowledge. Any information about this problem is highly appreciated. Thanks...
[ June 24, 2008: Message edited by: Denis Zjukow ]
14 years ago
Thanks for your explanation, Tim. Could you please tell me what particular Maven plugin you install?
14 years ago
Hello! I got a problem. We are currently starting a new javaee project (war + ejb, so we package it as an ear module). We want to use eclipse as an IDE and Maven as a build tool. We also want to use eclipse automatic build and deploy as it is very useful for development. The problem is that I haven't managed to use 'automatic build and deploy' feature, as maven and eclipse use different project layouts (I had an error when tried to deploy ear module to server (JBoss AS 4.2)). We've already used maven with eclipse for a web project (war module), and want to use same tools for this new project. So my question is: is it possible to adjust eclipse so that we could make builds with maven and still use automatic build and deploy. I've tried 'mvn eclipse:eclipse -Dwtpversion=1.5' but it seems it didn't solve the problem. Please help!
14 years ago
Thank you, K Bbb. I like the idea of conditional rendering. That's exactly what I was looking for.

However, it just seems strange to me that there is nothing like c:forEach among built-in facelet tags. I wish ui:repeat had same functionality as c:forEach, but it unfortunately doesn't.
15 years ago
JSF
Hello,

Having struggled for a couple of days I finally gave up and decided to ask for help.

I use Seam with Facelets. What I want is to show a list of entities in a table cell i.e a single cell may contain a comma-separted list.

Let's say I have two entity types: Item and Subitem. An instance of type Item may have a number of Subitems. In my case the relation between these two entity types is many-to-many.

So if I have Item1 with three subitems: Subitem1, Subitem2 and Subitem3, I want to see something like this:



Please note that I don't want a comma after the last subitem in a cell (Subitem3 in this case). Nothing special, an obvious requierment, isn't it?

The first thing I tried was ui:repeat:



Everything's fine except for the fact that there is a nasty comma after the last subitem. This made me try c:forEach tag:



Unfortunately this code won't work! It just leaves my favorite column empty. It seams that c:forEach do not see variable item.
I then tried to find a way to add the conditional logic to ui:repeat, but haven't managed to find anything like c:forEach's 'varStatus'.

Any ideas? Thank you all in advance!
15 years ago
JSF
Hello,

Having struggled for a couple of days I finally gave up and decided to ask for help.

I use Seam with Facelets. What I want is to show a list of entities in a table cell i.e a single cell may contain a comma-separted list.

Let's say I have two entity types: Item and Subitem. An instance of type Item may have a number of Subitems. In my case the relation between these two entity types is many-to-many.

So if I have Item1 with three subitems: Subitem1, Subitem2 and Subitem3, I want to see something like this:



Please note that I don't want a comma after the last subitem in a cell (Subitem3 in this case). Nothing special, an obvious requierment, isn't it?

The first thing I tried was ui:repeat:



Everything's fine except for the fact that there is a nasty comma after the last subitem. This made me try c:forEach tag:



Unfortunately this code won't work! It just leaves my favorite column empty. It seams that c:forEach do not see variable item.
I then tried to find a way to add the conditional logic to ui:repeat, but haven't managed to find anything like c:forEach's 'varStatus'.

Any ideas? Thank you all in advance!
15 years ago
Thank you, Hussam!

The flash clips are interesting. NetBeans seems really nice to me now. It's great that the IDE has built-in tools for Java EE 5 (especially the graphical editor for creating JFS views). And I really find it wonderful that NetBeans provids support for GlassFish. I've never tried NetBeans before, but I think I 'm gonna do that in the nearest future.

However I'm still confused: it can't be that such a popular IDE as Eclipse has no facilities for developing Java EE 5 applications?! Any ideas? Please help!
15 years ago
JSF
Hello,

Could anyone tell me what server would be a good choice for debugging Java EE 5 applications (in particular JSF application) on Eclipse platform (WTP 1.5.3).

I've already tried GlassFish (9.0_01, build b14), but it seems that its Eclipse plugin doesn't work properly. I haven't managed to run the server in debug mode. I was also thinking about Geronimo, but it turned out a bit complicated to find a plugin for Eclipse IDE. Actually, I found one, but it's only available in source code, there is a link for svn repository, so you have to check the code out and build it using Maven. Honestly, all I know about Maven is that this is some brand new tool for building projects. So I don't really like the idea of spending days for building the plug in. I wish I could get it built. Maybe you know where to get it?

In general, if you have any idea about the solution to my problem, please share it with me and other people. It would be perfect to know what tools do people use as well or what are the pluses and minuses of different servers. Thanks a lot!
15 years ago
JSF
Thanks Jaikiran!

I've read your blog. That was exactly what I wanted to know! Thank you!
Hello,

I use EJB 3 with JSF 1.2 in my application and run it under GlassFish (Sun Java System Application Server Platform Edition 9.0_01 (build b14)).

I pack the code into an EAR file with the following structure:

app-ear.ear:
META-INF /
application.xml
MANIFEST.MF

app-ejb.jar /
my.ejb.classes /
CommandBean.class
Command.class
Util.class
META-INF /
MANIFEST.MF
persistence.xml

app-war.war /
WEB-INF /
classes /
my.war.classes /
MyServlet.class
web.xml
faces-config.xml

My questions are:

- is it correct to use Util.class, which resides in the EJB module, from MyServlet, which is part of WAR module?

- is EJB module a right place for Util.class (it is not an EJB component!) taking into account that it should be used in both modules EJB as well as WAR.

The problems is that I have an exception during deployment. But what is the most interesting it is the fact that I didn't have this problem until I started using JSF. I've just added faces-config.xml and registered FacesServlet in web.xml. That's it. After doing that I have this deployment problem.

I also want to notice that the code worked before I put 'JSF nature' in it. That makes me think this is not a configuration problem.

Can anyone comment this, please. Thank you.