Ok, then in an SFSB how can you ensure that every time the property is accessed the factory is getting run again?
The way I understand it is that the factory is only executed when the corresponding property is null. Therefore, the only time that would apply is the very first time that the factory method is run on the SFSB.
I don't want to be dealing with stale data though! How should I solve this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012487#4012487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012487
Hi I need to access the connection pool in JBoss from a standalone program, im getting the context through JNDI like this:
Properties env = new Properties();
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
env.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
Context ctx = new InitialContext(env);
DataSource ds = (DataSource) ctx.lookup("java:SybaseDS");
Connection conn = ds.getConnection();
i'm getting the error that SybaseDS is not bound, however, at Jboss startup "java:SybaseDS" is well registered.
Someone told me that I need to configure Jboss to let standalone programs access the connection pool from outside the server, could you please tell me how can i do that, I'd really apreciate your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012486#4012486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012486
Hello,
I would like to know how "expensive" an extended application scoped persistence context is.
I.e. I have a menu consisting out of 1000+ elements that I need for every request. Therefore I would like to cache it - naturally in the application scope.
Now, instead of reading the whole menu on server startup, i thought about using an extended persistence context so already loaded stuff is reused and new stuff gets loaded from the DB (less work than manually loading the whole menu data in some structure).
Is this bad practice or a good idea ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012483#4012483
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012483