cache timeout?
by Omer Faruk Sen
Hi,
First of all I want to state that I am a newbie and my question maybe to
easy ;)
I have a problem with jboss.. When I deploy an application after this
application succesfully started I can connect to application but after
certain period of time say 1 hour when there is no connection in that
period I try to reconnect application but jboss gives me an error but
after that error message I can reconnect to the application. There seems
to be a cache issue with jboss. Where can I tweak that cache timeout in
jboss so my application is always up.
I have checked this with just a simple hello.war that gives me the same
behaviour thus I have decided that this is something with jboss not with
my application..
Best Regards,
Omer Faruk Sen
Arastirmaci/Researcher
Tubitak-UEKAE/ National Research Institute of Electronics and Cryptology
TUBITAK, Gebze
Ag Guvenligi Grubu/NetSEC
19 years, 10 months
[Beginners Corner] - Please help: Failed to run simple EJB 3.0 Application
by mathias.altmeyer
Hello.
I'm trying to deploy a simple EJB 3.0 application within JBoss Application Server (build CVSTag=JBoss_4_0_4_GA date=200605151000). Here is my sample code:
Remote Interface:
import java.math.BigDecimal;
import javax.ejb.Remote;
@Remote
public interface Converter {
public BigDecimal dollarToYen(BigDecimal dollars);
public BigDecimal yenToEuro(BigDecimal yen);
}
Bean class:
import javax.ejb.Stateless;
import java.math.BigDecimal;
@Stateless
public class ConverterBean implements Converter
{
private BigDecimal euroRate = new BigDecimal("0.0070");
private BigDecimal yenRate = new BigDecimal("112.58");
public BigDecimal dollarToYen(BigDecimal dollars) {
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2, BigDecimal.ROUND_UP);
}
public BigDecimal yenToEuro(BigDecimal yen) {
BigDecimal result = yen.multiply(euroRate);
return result.setScale(2, BigDecimal.ROUND_UP);
}
}
Test client:
import java.math.BigDecimal;
import javax.ejb.EJB;
import javax.naming.*;
public class ConverterClient
{
public ConverterClient()
{
}
public static void main(String[] args)
{
ConverterClient client = new ConverterClient();
client.doConversion();
}
public void doConversion()
{
try {
InitialContext ctx = new InitialContext();
Converter converter = (Converter)
ctx.lookup("converter/ConverterBean/remote");
BigDecimal param = new BigDecimal("100.00");
BigDecimal yenAmount = converter.dollarToYen(param);
System.out.println("$" + param + " is " + yenAmount + " Yen.");
BigDecimal euroAmount = converter.yenToEuro(yenAmount);
System.out.println(yenAmount + " Yen is " + euroAmount + " Euro.");
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
}
}
My JNDI properties file:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
My ear archive (named converter.ear) has the following content:
META-INF/application.xml
beans.jar
My beans.jar has the following content:
Converter.class
ConverterBean.class
After deploying the archive JBoss don't has created the context path "converter/ConverterBean/remote"! After compiling and running the test client I get an NameNotFoundException:
javax.naming.NameNotFoundException: converter not bound
I thought that I don't need a deployment descriptor anymore. Is my ear archive incorrect? What is my fault? Please help me!
Thank you! Mathiasanonymous wrote :
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964894#3964894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964894
19 years, 10 months
[JBoss Seam] - Re: Frustrated and anxious
by chuckadams
Oh the framework looks terrific -- I come here to praise seam, not to bury it :) I'm just chomping at the bit to get started, and feeling frustrated by the tools. It's probably not helped by the fact that I'm taking up JEE after only having dabbled in it years previously, so I'm having to re-learn all the tools and environment, and I'm having to learn the actual ins and outs of EARs instead of relying on my clicky GUI tools. Meanwhile, eclipse's JEE 5 support is pretty darn patchy, while Netbeans keeps throwing tracebacks at me. It must be a sign for me to quit IDE's or plunk down 5 Benjamins for IDEA. Frustrating 8-/
As for seamgen, I did indeed use the WTP mode, and scaffold-wtp-project. Eclipse complains about missing enterprise-beans tags, and when I fool it by commenting out the schema declaration attribute of ejb-jar, the JBoss deployer steps in and declares foul play; this is shown on another thread in the forum. Initially I had worse problems, since seamgen's set-properties won't overwrite the existing build.properties, which has defaults for win32.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964888#3964888
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964888
19 years, 10 months