Yaron Rel

Greenhorn
+ Follow
since Aug 04, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Yaron Rel

Under Jboss AS version 6 or 7:
If I have app1.ear that I need to be loaded before app2.ear
Is there any elegant way doing that?
thanks
11 years ago
I found some ways to know if I am allowed to remove an entity.
The entity removal can be disallowed due to constraints on the DB record that represent the entity to be removed.
I must admit that I don't love this ways because I rely on condition of exceptions, but this is what I got.
Here are 3 ways:
Hi,
I am trying to find a way to know if a removal of an entity is allowed.
is there any simple way to do that?
Thanks
Yaron


The method signature:



I have 2 Stateless session bean that I can use each of them:
1. CMT bean with injected entity manager.
2. BMT bean with entity manager that is being created by entity manager factory.

I found the problem:
After I tried all the doctype options that I found in: http://w3schools.com/tags/tag_DOCTYPE.asp
and none of them worked, I took the page source and cut one by one, tag by tag and I found out that I used the deprecated align="right" in the "table" tag.
for some reason, the eclipse editor and my firefox and IE8 browsers don't mention that there is doctype problem in the page.
Instead, both browsers just remove the horizontal scrolling.
14 years ago
JSF
Yes.
inner elements has horizontal scrolling when their CSS is defined.
Actually here are some advices regarding this issue:
http://community.jboss.org/message/531959#531959
14 years ago
JSF
Hi,
I am sorry for not being clear enough.
I used every single permutation of these css examples including none of the options.
Nothing works.
Thanks
Yaron
14 years ago
JSF
Hi,

I found out that the following DOCTYPE cuts my web page content if its to wide for the screen without the ability to do horizontal scrolling:




If I don't use this DOCTYPE all the richfaces fading feature don't work (for example the background of <h:inputText>).

I saw in the richfaces demo sources that they also use this DOCTYPE, but they have horizontal scrolling.

Using the following css in the html tag also don't help.



What should I do in order to force horizontal scrolling?


14 years ago
JSF
Hi,
My problem is that for some reason, the path to my remote bean is being duplicated by the InitialContext as you can see also in the exception:
/my-app-ear-name/GeneralDao/my-app-ear-name/GeneralDao/remote

It happens only when I run unit-test from eclipse.
If this test run with maven, it works OK.
why is that happening?
How can I avoid this?
I work with jboss-5.1.0.GA , java 6.0.12

The way I do the lookup:


The exeption:


my remote bean declaration:


GeneralDaoIfcRemote:

I found some solution:
BTW,
in order to avoid "PartialResultException" its recommended to use:
1. searchResults.hasMoreElements() instead of searchResults.hasMore()
2. env.put(Context.REFERRAL, "follow");

14 years ago
Hi,
1. I haven't find yet simple way to get all user groups.
2. is there any way for fetching their unique identifiers in case their name will be changed?

Here is the code sample I use:
14 years ago
Hi,
My Question:
Why does the default empty string value of myBackingBean.yearStr becomes null after the page is loaded?
My Environment:
I am using RichFaces 3.3 with JBOSS 6, and Seam 2.1.2

Thanks in advanced
Yaron



comboBoxUtil:


The declaration of yearStr in the backing bean:
14 years ago
JSF
Hi again,
If you have done all that and still get this error, I have 1 more advise: Make sure you change the JAVA_OPT value only after JBOSS initializes it!
otherwise, JBOSS would skip its initialization.
To my opinion, the best place to do that is at the end of the following file:
WINDOWS: JBOSS_HOME/bin/run.conf.bat
UNIX: JBOSS_HOME/bin/run.conf
14 years ago
Hi,
Why this happens?

The "PermGen" error happens, when the Java virtual machine runs out of memory in the permanent generation. Recall that Java has a generational garbage collector, with four generations: eden, young, old and permanent.
In the eden generation, objects are very short lived and garbage collection is swift and often.
The young generation consists of objects that survived the eden generation (or was pushed down to young because the eden generation was full at the time of allocation), garbage collection in the young generation is less frequent but still happens at quite regular intervals (provided that your application actually does something and allocates objects every now and then).
The old generation, well, you figured it. It contains objects that survived the young generation, or have been pushed down, and garbage collection is even less infrequent but can still happen.
And finally, the permanent generation. This is for objects that the virtual machine has decided to endorse with eternal life - which is precicely the core of the problem. Objects in the permanent generation are never garbage collected; that is, under normal circumstances when the jvm is started with normal command line parameters.
So what happens when you redeploy your web application is, that your WAR file is unpacked and its class files loaded into the jvm. And here's the thing: almost always ends up in the permanent generation...
(taken from: http://rlogiacco.blogspot.com/2009/02/jboss-and-permgen-outofmemoryerror.html)



Here are some advices I saw:
  • use this parameters for your JVM. they tell the Garbage Collector to invoke its algorithm also on the PermGen.
    set JAVA_OPTS=-Xms512m -Xmx512m
    -XX:PermSize=128m
    -XX:MaxPermSize=512m
    -XX:+UseConcMarkSweepGC
    -XX:+CMSPermGenSweepingEnabled
    -XX:+CMSClassUnloadingEnabled

    The CMSPermGenSweepingEnabled setting includes the PermGen in a garbage collection run. By default, the PermGen space is never included in garbage collection (and thus grows without bounds).
    The CMSClassUnloadingEnabled setting tells the PermGen garbage collection sweep to take action on class objects. By default, class objects get an exemption, even when the PermGen space is being visited during a garabage collection.
    (taken from: http://community.eapps.com/showthread.php?p=537)

  • Restart your JBOSS because each time you deploy application, you increase the amount of data in the PermGen.

  • Use JRocket JVM instead of the Sun JVM. it doesn't have any PermGen in its Garbage Collector algorithm.



  • in case you wand simple JSP file to monitor your memory you can find it here:
    http://www.freshblurbs.com/explaining-java-lang-outofmemoryerror-permgen-space
    14 years ago
    Hi,
    Thats what I think that should be, but the fact is that when I put asside the other app jars every think works fine.
    also, the only place that the MyFaces jars can come from in JBOSS is only from other application because JBOSS default implementation of JSF is JSF RI and not those of apache MyFaces.
    Yaron
    14 years ago
    JSF
    Hi,
    Thanks for your reply.
    my application uses Jboss Seam that requires JSF RI (which JBOSS already holds) and not MyFaces.
    I don't hold in my ".ear" file any JSF implementation because I want my application to use those of JBOSS.
    When I run my app without any other app every thing goes well.
    The problem starts when the other application that run on the same JBOSS (without ear file, just a folder) uses MyFaces
    and then there is a conflict in the class loaders that causes my exception.
    I need a way to force JBOSS to use it's JSF RI jars for my application instead of using the MyFaces jars of the other application for my application.
    In the meanwhile I found some clues that might solve this:
    1. The other application should be packed in ".ear" file and that the MyFaces jars will be part of the ".ear" file.
    2. consider using "hierarchical classloader" (or Isolation) with JBoss (jboss-app.xml, jboss-web.xml). see also: http://community.jboss.org/wiki/ClassLoadingConfiguration
    3. add the following to my application web.xml (but this wasn't enough):

    14 years ago
    JSF