Stephan Staeheli

Greenhorn
+ Follow
since Jul 22, 2002
Merit badge: grant badges
For More
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 Stephan Staeheli

Are you still looking for help?

I suggest you open the wls console (normally at http://localhost:7001/console), go to your server and open the jndi tree. Is the bean there that your were looking up in you jndi context?

Regards,
Stephan
I don't know what JBoss is able to or not. Take this link (Quartz Scheduler Open Source) as alternative, we have made some good experience.

Regards,
Stephan
[ May 09, 2006: Message edited by: Stephan Staeheli ]
Yes, we are switching from float to double. And thank you for the link, I found that, too. I was aware of having problems when counting with floats (add, multiply...), but with just creating them, I was completly shocked!!!
Look at this:

Result:
entered: 520535.05 - effective: 520535.06
entered: 520535.06 - effective: 520535.06
entered: 520535.07 - effective: 520535.06
entered: 520535.08 - effective: 520535.1
entered: 520535.09 - effective: 520535.1
entered: 520535.10 - effective: 520535.1
entered: 520535.11 - effective: 520535.12
entered: 520535.45 - effective: 520535.44
entered: 520535.75 - effective: 520535.75
entered: 520535.85 - effective: 520535.84
entered: 520535.95 - effective: 520535.94
entered: 520535.98 - effective: 520535.97
entered: 520535.99 - effective: 520536.0
entered: 520536.00 - effective: 520536.0
entered: 520536.01 - effective: 520536.0
entered: 520536.02 - effective: 520536.03

What sence does it make to use float!!! In my opinion this field type is completly useless!!!

Stephan
[ September 01, 2005: Message edited by: Stephan Staeheli ]
17 years ago
Hi there

I read values from a file as Strings. One of this string value is a float and I want to convert this String to a Float. Now I do the following:



Very strange, but this returns a wrong value. What am I doing wrong? Is this some kind of rounding problem? How can I suppress rounding?

Regards,
Stephan
17 years ago
What exactly are you trying to do? A MDB doesn't have a client. What is your client doing? Do you want to write a message into the queue? Please provide the code from you client, otherwise it's difficult to help you.

Stephan
Here is a part of the code:



Ok, now I think I just found the problem. The formatter is a static variable that is used by all instances of ImplClass. The DecimalFormatter is surly not synchronized, so this will be the problem.

Sometimes it just helps talking about a problem with somebody else. Thanks alot, it was a great pleasure!

Stephan
Hi there

I never worked with orion, so I just have to guess: Is there some kind of 'orion-cmp-rdbms-jar.xml' that maps the cmp-fields to real database fields? In WebLogic I have such thing and there I also have to register my finder methods. Have a look in your docu for 'cmp-rdbms', hope this helps.

Stephan
Hi there

I ask myself if method of an abstract base class is unique when called from different instances. Let me explain: I have abstract base class that has a method (not a static one, a simple instance method). Now I have a implementation class of this abstract base class that has a lot of instances. Now these instances all call this method from the base class, do I have to synchronize this method or gets the implementation class some kind of copy of the method when it inherits it and every instance has it's own copy?

I have the strange behavior that in this method I cast a string to a float value in a try-catch-block. Sometimes this method crashes with a NumberFormatException and in my log message I print out the input field of the method and this values differs from the one that jre writes out in the stackTrace!!!

Any help or hint is appreciated!

Regards,
Stephan
If you don't have a problem getting in dependance of WLS forget the manifest file and do it like this:

  • Make a EJB.jar with the bean, component and home interface, xml-files for all beans or group them in one or more ejb.jar (like put all beans from the presentation layer in one ejb.jar, the ejbs from the data access layer in another...).
  • Make a web.war with servlet classes, xml-files, jsps, gifs, htmls.
  • Make a common.jar with all other classes.
  • Put them all together in a application jar, a ear.jar. Now the important part is to put all ejb.jar and web.wars in the ear.jar with no path.
  • Add the common.jar and all 3rd party tools in the ear.jar with the path "APP-INF/lib".
  • Add all properties files that you would put into the classpath (log4j.xml, appplication.properties...) in the ear.jar with the path "APP-INF/classes".
  • Create a application.xml and put it into the "meta-inf" path of the EAR. It should look like that:




  • When you are deploying like that you'll have no problems with hot deployment and classloading!

    Greets,
    Stephan


    WLS tips about classloading
    WLS tips about startup classes
    [ August 10, 2005: Message edited by: Stephan Staeheli ]
    the other project called the setRollbackOnly() now it's clear to me.

    Thank you for your advice!
    No, the ExceptionABC is not a RuntimeException, it's just a simple CheckedException. But I don't know if the other project calls setRollbackOnly, I will check that.

    So what you say is that when the Exception is not a RuntimeException and nobody calls setRollbackOnly, it should work?

    Regards,
    Stephan
    Hi there

    I have a CMT problem and I don't have an idea to solve it:

    My method in stateless SB BeanA runs with transaction attribute 'RequiresNew' and calls an internal SLSB (with the same trx attribute). Now this one calls another SLSB (let's call it BeanB) from another project. They have an attribute 'Required'.

    Now when the call to BeanB crashes and returns me an exception I analyse this exception. When it's exception ExceptionABC then this whould be ok, I don't have to roll back my transaction. Unfortunatly now the whole transaction is marked 'rollback' and I can't change it (or can I?). I can't change my internal SLSB to 'NotSupported' because when I have an internal problem I want to roll back the transaction in the external project, too.

    Do I have to another possibilty to handle this? Can I switch back the 'rollback state' in my transaction?

    I hope there is a possible solution to solve my problem.

    Greets,
    Stephan
    Hi Severin (jo, ich cha d��tsch)

    Thanks for your help, everything works fine now.

    Stephan
    Thank you very much for your help. Especially to David, I just called the methods and wondered why there is no new transaction starting...

    Regards,
    Stephan
    Is it allowed and working correctly when I define a transaction attribute for a private method in my bean?

    Stephan