[JBossCache] - Re: What is the relation between in-memory nodes and nodes i
by sg283
Please confirm if I understand this correctly:-
1- Suppose I have defined maxNodes in region X to be 4500, and my application tries to put 1000 more nodes in region X then there would be 5500 nodes in total; 4500 in region X and 1000 nodes in region _default_. All 4500 nodes in region X would be evicted as per eviction defined in region X and all 1000 nodes in region _default_ would be evicted by the eviction time defined in region _default_.
2- If I have tree cache nodes a,b, and c , a being the root node and c being the leaf node and b being the intemediate node, suppose for some reason, node a and c are in region X and node b is in region _default_.
Eviction time in region X is 10 minutes and in _default_ is 5 minutes.
If node b expires after 5 minutes, what would happen to node c? Would node c be lost?
3- Is there any way to know which node in my cache is in which region at any givn point of time?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083780#4083780
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083780
18 years, 9 months
[JBoss Seam] - @Restrict on entity bean and orm.xml and @Startup EJB3 probl
by gaboo
I'm using seam cvs (2 weeks old I think).
I use @Restrict on entity beans.
The doc here http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/security.html#d0e6939 states
anonymous wrote : If you are using a Hibernate SessionFactory configured via Seam, you don't need to do anything special to use entity security.
As I use this :
<persistence:managed-persistence-context name="entityManager"
| auto-create="true"
| persistence-unit-jndi-name="java:/metabookEntityManagerFactory"/>
I was using a "Hibernate SessionFactory configured via Seam" ?
It seems not so I looked for an @Restrict example. The only one used in entitybeans is in seamspace example. And the example has this orm.xml file.
So I've put it too in our project and ... it works, but breaks this :
@Name("settings")
| @Scope(APPLICATION)
| @Startup
| public class Settings {
|
| @In
| private EntityManager entityManager;
|
| private Map<String, String> settings;
|
| public String getSetting(String key) {
| if (settings.containsKey(key)) {
| return settings.get(key);
| } else {
| return "";
| }
| }
|
| @Create
| @SuppressWarnings("unchecked")
| public void loadSettings() {
|
| List<Parameter> resultSet = entityManager.createQuery(
| "select p from Parameter p where realm = 'application'")
| .getResultList();
| [ ... ]
| }
|
| @Remove
| @Destroy
| public void destroy() {
| }
| }
|
Without the orm.xml file, the above component works and is successfully loaded and created at startup, but @Restrict on entities doesn't work.
I get this when deploying with the orm.xml file :
08:18:23,325 INFO [Contexts] starting up: org.jboss.seam.remoting.remoting
| 08:18:23,326 INFO [Contexts] starting up: org.jboss.seam.ui.graphicImage.graphicImageResource
| 08:18:23,331 INFO [Contexts] starting up: org.jboss.seam.ui.resource.styleResource
| 08:18:23,332 INFO [Contexts] starting up: settings
| 08:18:23,820 ERROR [[/metabook]] Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.jboss.seam.servlet.SeamListener
| java.lang.IllegalStateException: No active session context
| at org.jboss.seam.security.Identity.instance(Identity.java:157)
| at org.jboss.seam.security.EntitySecurityListener.postLoad(EntitySecurityListener.java:26)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:31)
| at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:78)
| at org.hibernate.ejb.event.EntityCallbackHandler.postLoad(EntityCallbackHandler.java:71)
| at org.hibernate.ejb.event.EJB3PostLoadEventListener.onPostLoad(EJB3PostLoadEventListener.java:35)
| at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:201)
| at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
| at org.hibernate.loader.Loader.doQuery(Loader.java:729)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
| at org.hibernate.loader.Loader.doList(Loader.java:2220)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
| at org.hibernate.loader.Loader.list(Loader.java:2099)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
| at com.lrb.metabook.Settings.loadSettings(Settings.java:50)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:23)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
| at com.lrb.metabook.Settings_$$_javassist_0.loadSettings(Settings_$$_javassist_0.java)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:23)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:127)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2083)
| at org.jboss.seam.Component.callCreateMethod(Component.java:2006)
| at org.jboss.seam.Component.newInstance(Component.java:1977)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
| at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
| at org.jboss.seam.init.Initialization.init(Initialization.java:545)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy46.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
It breaks in my code here, when I try to use the entityManager :
at com.lrb.metabook.Settings.loadSettings(Settings.java:50)
So, I have two questions :
- Why do I have to use the orm.xml file ?
- Why does my above component does not work when using it ?
Thanks you ! :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083778#4083778
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083778
18 years, 9 months
[Messaging, JMS & JBossMQ] - Exception occurs even when connection exists
by adoorsarath
Sir,
I have a JMS application running in Tomcat.
I have timer task which will retrieve messages from JBossMQ Queue
When I stop the JBoss,the JMS application throws the Exception in the
following code snippet
message = (TextMessage)messenger.receiveNoWait( destination );
Cannot subscribe to this Destination: Client is not connected; - nested throwabl
e: (java.io.IOException: Client is not connected)
org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: Client is no
t connected; - nested throwable: (java.io.IOException: Client is not connected)
at org.jboss.mq.Connection.addConsumer(Connection.java:1094)
at org.jboss.mq.SpySession.addConsumer(SpySession.java:753)
at org.jboss.mq.SpyQueueSession.createReceiver(SpyQueueSession.java:105)
at org.apache.commons.messenger.MessengerSupport.createMessageConsumer(M
essengerSupport.java:909)
at org.apache.commons.messenger.MessengerSupport.getMessageConsumer(Mess
engerSupport.java:871)
at org.apache.commons.messenger.MessengerSupport.receiveNoWait(Messenger
Support.java:285)
at org.amma.atech.hmos.sms.JMSResponseHandler.run(JMSResponseHandler.jav
a:81)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)
Caused by: java.io.IOException: Client is not connected
at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.
java:225)
at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:189
)
at org.jboss.mq.il.uil2.UILServerIL.subscribe(UILServerIL.java:463)
at org.jboss.mq.Connection.addConsumer(Connection.java:1082)
... 8 more
I have caught the Exception and written code to reconnect to the
Application Server.
But Still it is throwing the Same Exception .But it doesn't throw any
exception while connecting to the server and looking up the destination.
If any body Knows the Solution,please help me..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083776#4083776
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083776
18 years, 9 months
[JBoss Seam] - Re: Adding Seam to an existing EJB2 application
by kummer
The demoManager is created using seam-gen's new-conversation target. The xhtml page (as generated) has buttons for beginning and ending a conversation and for incrementing a value, which is shown on the page. The bean has the corresponding methods. Again, this is the raw product from the new-conversation target. Here is the code for the interface, the bean and the XHTML:
DemoManager.java
| package lu.deka.tukan.session;
|
| import javax.ejb.Local;
|
| @Local
| public interface DemoManager {
|
| //seam-gen methods
| public String begin();
| public String increment();
| public String end();
| public int getValue();
| public void destroy();
|
| //add additional interface methods here
| }
|
|
DemoManagerBean.java
| package lu.deka.tukan.session;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Begin;
| import org.jboss.seam.annotations.End;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.log.Log;
|
| @Stateful
| @Name("DemoManager")
| public class DemoManagerBean implements DemoManager {
|
| @Logger private Log log;
|
| private int value;
|
| @Begin
| public String begin()
| {
| //implement your begin conversation business logic
| log.info("beginning conversation");
| return "success";
| }
|
| public String increment()
| {
| log.info("incrementing");
| value++;
| return "success";
| }
|
| //add additional action methods that participate in this conversation
|
| @End
| public String end()
| {
| //implement your end conversation business logic
| log.info("ending conversation");
| return "home";
| }
|
| public int getValue()
| {
| return value;
| }
|
| @Destroy @Remove
| public void destroy() {}
| }
|
demoManager.xhtml
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| template="layout/template.xhtml">
|
| <ui:define name="body">
|
| <h:messages globalOnly="true" styleClass="message"/>
|
| <rich:panel>
| <f:facet name="header">demoManager</f:facet>
|
| <div class="dialog">
| <div class="prop">
| <span class="name">Value</span>
| <span class="value">#{DemoManager.value}</span>
| </div>
| </div>
|
| </rich:panel>
|
| <h:form id="DemoManager">
| <div class="actionButtons">
| <h:commandButton id="begin" value="Begin"
| action="#{DemoManager.begin}"/>
| <h:commandButton id="inc" value="Increment"
| action="#{DemoManager.increment}"/>
| <h:commandButton id="end" value="End"
| action="#{DemoManager.end}"/>
| </div>
| </h:form>
|
| </ui:define>
|
| </ui:composition>
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083774#4083774
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083774
18 years, 9 months
[JNDI/Naming/Network] - Re: basic JNDI beginners problems - cant do look up from app
by jaikiran
"wiggy" wrote : still having a problem here that I dont seem to be able to resolve
|
| I did a search on goole and got similiar people who have had similar problem and i'm note sure any of them seem to quite get to a resolution
|
| see www.jboss.com/?module=bb&op=viewtopic&t=68072 and
| www.jboss.com/?module=bb&op=viewtopic&t=75499
| and www.theserverside.com/discussions/thread.tss?thread_id=32699
|
| etc .
|
| still battling with this - on my works computer.
|
| I eventually got the passwords from support teams and diabled the local firewall (intengrity flex agent) and this doesnt seem to fix it either - i'ven turned the firwall back on and configured it to accept open port 1099 for trusted zoen access (localhost)
|
| I can ping localhost from the cmd shell so the dns for localhost seems to resolve. Any ideas anyone
|
|
wiggy,
I tried out a sample test on my local setup to see if i was missing something. Everything worked fine for me. I then went through your post again and found the problem. Here it is, you are using:
anonymous wrote :
| private static Hashtable getInitialContextProperties()
| {
|
| Hashtable props = new Hashtable();
| props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| props.put("javax.naming.Context.PROVIDER_URL","jnp://localhost:1099");
| props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces" );
| return props;
| }
That key, javax.naming.Context.PROVIDER_URL is incorrect. It should be
java.naming.provider.url. Also, it always safer to use the constants meant for these as follows:
private static Hashtable getInitialContextProperties()
| {
| Hashtable props = new Hashtable();
| props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
| props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
| return props;
| }
Try it out and see if it works on your setup.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083772#4083772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083772
18 years, 9 months