Setting up cache synchronization using JMS on Tomcat

I'm trying to enable cache synchronization using JMS on Tomcat 5.0; Does anyone have any tips on how to do this?

Configure the TIBCO service to provide a Topic and a TopicConnectionFactory for TopLink to use.
You will need to register for a pre-login event configured on the session that will configure the JMSClusteringService for the TIBCO service.
ie.
JMSClusteringService clusteringService = new JMSClusteringService(event.getSession());
event.getSession().setClusteringService(clusteringService);
Hashtable env = new Hashtable();
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY , "TIBCOFactoryClassName");
env.put(javax.naming.Context.PROVIDER_URL, "url");
env.put(javax.naming.Context.SECURITY_PRINCIPAL, "userName"));
env.put(javax.naming.Context.SECURITY_CREDENTIALS,"password");
clusteringService.setInitialContextProperties(env);
--Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Distributed Cache synchronization with JMS

    Hello,
    The documentation on Cache Synchronization using JMS lists steps to setting up JMS in the JMSClusteringService but does not list steps as to how to connect or setup connections to the various different servers inorder to synchronize between them. It lists steps for connecting to servers when using RMI but not JMS. Appreciate any additional documentation on doing this in JMS. Many thanks

    JMS, by its nature, provides the connections between the different 'servers'. If all servers connect to the same JMS service then there are no additional actions required to have the 'servers' synchronize.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Toplink Cache sync using JMS

    Hi,
    I am using toplink cache synchronization using Orion JMS. While starting the application I get the following erorr message.
    Oracle apps server version is 10.1.2.0.0 toplink 9.0.4.5
    Local Exception Stack:
    Exception [TOPLINK-15016] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.SynchronizationException
    Exception Description: Could not gain access to SynchronizationService class
    Internal Exception: Exception [TOPLINK-15013] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.SynchronizationException
    Exception Description: Could not find JMS Service Topic named: jms/MyCacheSyncTopic
    Internal Exception: javax.naming.NameNotFoundException: jms/MyTopicFactory not found
    at oracle.toplink.exceptions.SynchronizationException.errorGettingSyncService(SynchronizationException.java:139)
    at oracle.toplink.remote.CacheSynchronizationManager.initialize(CacheSynchronizationManager.java:114)
    at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:534)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:250)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:181)
    at com.starkey.cqm.dao.PersistenceService.initializeService(PersistenceService.java:67)
    at com.starkey.cqm.bcs.CQMServiceManager.createService(CQMServiceManager.java:68)
    at com.starkey.cqm.web.util.CQMInitServlet.init(CQMInitServlet.java:40)
    I have made the modifications in sessions.xml as follows
              <cache-synchronization-manager>
                   <clustering-service>oracle.toplink.remote.jms.JMSClusteringService</clustering-service>
                   <jms-topic-connection-factory-name>jms/MyTopicFactory</jms-topic-connection-factory-name>
                   <jms-topic-name>jms/MyCacheSyncTopic</jms-topic-name>     
              </cache-synchronization-manager>
    Changes in JMS xml
    <topic name="MyCacheSyncTopic" location="jms/MyCacheSyncTopic"/>
    <topic-connection-factory
              host="cqtest1"
              port="3702"
              name="Cache Sync Topic Factory"
              location="jms/MyTopicFactory" />
    Has any one encountered this before ?
    Thanks
    Priya

    Hi Steve,
    Servers 1 and 2 may have dropped the connections to 3. One way that this can happen is if at some point an object delta is sent to a target server that does not have the object deployed, or on its classpath. Make sure that log-debug is turned on for the TopLink session. You should see warnings on servers 1 and 2 about the connections being dropped to 3.
    If none of this seems to help or if you can't find the answers from the debug traces then the logs of the three servers would help support in determining where the problem occurred.
    -Mike

  • Configuring Toplink Cache Coordination using JMS

    After having spent one whole day reading documentation on the above topic, I did not get anywhere. I am looking for a direction to start aquainting myself with Oracle JMS basics to enable me with the configuration in toplink. I hope someone could please help me in getting started, direct me to documentation and/or examples and then I could have some specific and meaningful questions to ask.
    As of now, I have these questions.
    1) In order to configure Toplink Cache Coordination using JMS, do I use Oracle AS JMS or OJMS provider?
    2) Should I be configuring OJMS before I could use Oracle AS JMS?
    3) If I am using Oracle 10.1.2 Application Server, will OJMS Database Schema be defined and the resource adapter deployed by default or is there a way I check this using Oracle Enterprise Manager Console.
    4) Should I be adding a JMS provider within the OC4J for the application I am using before I do any of the above?
    Any help will be highly appreciated.
    Thanks
    Swapna

    Ok. I found my answers
    1) In order to configure Toplink Cache Coordination using JMS, do I use Oracle AS JMS or OJMS provider?
    Either of the one can be used. Here is what I found regarding the trade off
    OJMS and OracleAS JMS are both J2EE 1.3 compliant JMS providers from Oracle. OJMS has been integrated into OracleAS 10g using the JCA adapter while at the same time leveraging Advanced Queuing in the Oracle Database for persistence and recoverability. If database recoverability guarantees, SQL queriability, transparent application failover, message transformation, propagation are required then Oracle recommends using OJMS as the JMS provider.
    OracleAS JMS is a lightweight, in-memory/file based queuing system that provides a complete J2EE 1.3 JMS implementation. It is suited for applications that do not require Oracle specific JMS extensions or the recoverability guarantees that OJMS provides.
    2) Should I be configuring OJMS before I could use Oracle AS JMS?
    No. OracleAS JMS is always provided and preconfigured, except for the topics and queues, with the OC4J installation.
    3) If I am using Oracle 10.1.2 Application Server, will OJMS Database Schema be defined and the resource adapter deployed by default or is there a way I check this using Oracle Enterprise Manager Console.
    No. The schema needs to be created by the admin and OJMS needs to be configured as the JMS Provider using this schema.
    4) Should I be adding a JMS provider within the OC4J for the application I am using before I do any of the above?
    Yes, if not using Oracle AS JMS.
    Hope that was accurate.

  • Cache Synchronization with JMS and a Message Driven Bean (MDB)

    If I understand correctly, Toplink ueses the following configuration info to find the target to publish its session messages to a JMS server (having its URL as below) which provides the JNDI service that Toplink needs to look up the topic:
    <cache-synchronization-manager>
    <clustering-service> oracle.toplink.remote.jms.mdb.JMSPublishingOnlyClusteringService
    </clustering-service>
    <should-remove-connection-on-error>false</should-remove-connection-on-error>
    <!-- both of the following tags are user specified and must correspond to -->
    <!-- the settings that the user has made, manually, to the JMS Service -->
    <jms-topic-connection-factory-name> jms/TopLinkTopicConectionFactory
    </jms-topic-connection-factory-name>
    <jms-topic-name>jms/TopLinkCacheSynchTopic</jms-topic-name>
    <!-- both of the following tags will be required if OracleAS TopLink -->
    <!-- is not running in the same JVM as the JNDI service that is hosting the JMS Topic -->
    <naming-service-url>ormi://localhost:23791</naming-service-url>
    <naming-service-initial-context-factory> com.evermind.server.rmi.RMIInitialContextFactory </naming-service-initial-context-factory></cache-synchronization-manager>
    The MDB also uses the same JNDI service provided by the JMS server to listen to the topic which is named in the ejb-jar.xml file:
    <enterprise-beans>
    <message-driven>
    <display-name>TopLink clustering MDB</display-name>
    <ejb-name>TopLinkClusteringMDB</ejb-name>
    <ejb-class>com.mycompany.mdb.ClusteringMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination> <destination-type>javax.jms.Topic</destination-type>
    </message-driven-destination>
    <env-entry>
    <description>TopLink session name</description>
    <env-entry-name>tl_session_name_for_mdb</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>Employee_Session</env-entry-value>
    </env-entry>
    <resource-ref> <description>description</description>
    <res-ref-name>jms/TopLinkTopicConectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name> jms/TopLinkCacheSynchTopic</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type> </resource-env-ref>
    </message-driven></enterprise-beans>
    To do this, the EJB container that hosts the above MDB needs to be configured to know where the JMS server is by using the above URL same as in the Toplink sessions.xml file.
    I am not clear that who provides the JNDI service for the Toplink session name lookup used by the MDB:
    // Obtain the Session name configured in the environment variable
    String sessionName = (String) myEnv.lookup(TOPLINK_SESSION_NAME);
    session = SessionManager.getManager().getSession(sessionName);
    so that the MDB can find the currently running Toplink session and communicate with it.
    Can anybody help answer my above question and correct my understandings?
    Many thanks!

    Although TopLink is running in the application server’s VM, the only notable integration points with the server are for JTA and user-defined data sources. All of the work performed to get a session via SessionManager occurs solely within TopLink. When the call is made to retrieve a session, you aren’t getting the ‘active’ session identified by “Employee_Session” that is registered with the application server, rather a new session is created using the definition that exists for “Employee_Session” in sessions.xml.
    When the call ‘session = SessionManager.getManager().getSession(“Employee_Session”)’ is made, the SessionManager simply looks for sessions.xml at the root level of its deployed jars or classpath, then looks for the “Employee_Session” tag within sessions.xml. If a session exists in the file with that name then a TopLink session object is created and returned.
    Note that setting an environment entry as mentioned above simply allows for the session name to be declared dynamically. The call to ‘myEnv.lookup(“tl_session_name_for_mdb”)’ simply asks the bean’s environment for the <env-entry-value> that matches the <env-entry-name>. That string is then used in SessionManager (no different than a hard coded value would be) to identify the session in sessions.xml that is to be loaded.
    I hope this makes sense.

  • Toplink Cache Coordination using JMS - doesn't work, gives a warning

    Hi, I am trying to implement cache coordination on Oracle App Server 9.0.4 in a clustered environment. I have two application sessions configured to use JMS for cache coordination. When I make an update to one of the objects in one application which is cached and used by both the applications, I get the below warning in the log file and the changes does not propogate to the other application.
    [TopLink Warning]: 2007.10.23 01:45:17.463--ServerSession(802908582)--Thread(Thread[Thread-112,5,ApplicationServerThreadGroup])--null
    command failed due to: javax.jms.JMSException: getObject
    at com.evermind.server.jms.JMSUtils.makeJMSException(JMSUtils.java:1899)
    at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1915)
    at com.evermind.server.jms.EvermindObjectMessage.getObject(EvermindObjectMessage.java:128)
    at oracle.toplink.internal.remotecommand.jms.JMSTopicRemoteConnection.onMessage(JMSTopicRemoteConnection.java:73)
    at oracle.toplink.remotecommand.jms.JMSTopicTransportManager$JMSOnMessageHelper.run(JMSTopicTransportManager.java:261)
    I have no clue from the warning above as to what could be wrong. Does anybody have any idea? Is there a way I could debug and see what really is happening?
    Thanks
    Swapna

    Hi, thanks for your response.
    I set the logging level to all and this is the complete stack trace I see in the log.
    [TopLink Finest]: 2007.10.25 01:54:04.547--ServerSession(2121070148)--Thread(Thread[Thread-465,5,main])--Retreived remote message from
    JMS topic: ICMS Toplink topic
    [TopLink Warning]: 2007.10.25 01:54:04.555--ServerSession(2121070148)--Thread(Thread[Thread-465,5,main])--null command failed due to:
    javax.jms.JMSException: getObject
    at com.evermind.server.jms.JMSUtils.makeJMSException(JMSUtils.java:1899)
    at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1915)
    at com.evermind.server.jms.EvermindObjectMessage.getObject(EvermindObjectMessage.java:128)
    at oracle.toplink.internal.remotecommand.jms.JMSTopicRemoteConnection.onMessage(JMSTopicRemoteConnection.java:73)
    at oracle.toplink.remotecommand.jms.JMSTopicTransportManager$JMSOnMessageHelper.run(JMSTopicTransportManager.java:261)
    I am using toplink version 10.1.3.1. I contacted Oracle Technical support but so far they were not able to figure this out. I will try using RMI as you suggested to make sure.
    I have another question to ask you about logging. I am working on a different application which is in production and uses toplink version 9.0.3. Due to excessive logging, I am trying to set the logging level to warning and I don't see this as an option in 9.0.3. The documentation does talk about it but using toplink workbench and I can't open the session.xml using Toplink workbench 9.0.3. Is it doable at all in toplink version 9.0.3?
    Thanks
    Swapna

  • 10.1.3 cache synchronization using custom RMI code

    I am trying to port our custom RMI synchronization code (overriding RMIClusteringService) from 9.0.4 to 10.1.3.
    It works by sending an update message to the remote cache whenever an object gets changed on the local cache as follows:
    2006.05.15 11:28:38.117--ServerSession(1102039280)--Thread(Thread[RMI TCP Connection(926)-19.39.48.136,5,RMI Runtime])--Received updates from Remote Server
    This message then results in a trip to the DB to get the object updates.
    Per 10g documentatation, the changed notification should contain the changed attributes (change set) and this should not result in a DB trip for the remote cache. I am not seeing this behavior.
    This is probably because I was using the old (9.0.4) sessions file with our custom cache synchronization manager, which overrides toplink cache sync settings, as shown below:
    <cache-synchronization-manager>
    <clustering-service>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringService
    </clustering-service>
    <naming-service-url>localhost:1099</naming-service-url>
    </cache-synchronization-manager>
    <event-listener-class>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringServiceSessionEventAdaptor</event-listener-class>
    With 10.1.3 RMIClusteringService is deprecated and replaced by RMITransportManager. A whole bunch of other classes has been added. Has anyone migrated or written RMI custom cache sync code to use RMITransportManager? If so, can they share their experiences and/or send their code samples? Any other thoughts will be appreciated too.
    thanks,
    Prabodh.

    I am trying to port our custom RMI synchronization code (overriding RMIClusteringService) from 9.0.4 to 10.1.3.
    It works by sending an update message to the remote cache whenever an object gets changed on the local cache as follows:
    2006.05.15 11:28:38.117--ServerSession(1102039280)--Thread(Thread[RMI TCP Connection(926)-19.39.48.136,5,RMI Runtime])--Received updates from Remote Server
    This message then results in a trip to the DB to get the object updates.
    Per 10g documentatation, the changed notification should contain the changed attributes (change set) and this should not result in a DB trip for the remote cache. I am not seeing this behavior.
    This is probably because I was using the old (9.0.4) sessions file with our custom cache synchronization manager, which overrides toplink cache sync settings, as shown below:
    <cache-synchronization-manager>
    <clustering-service>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringService
    </clustering-service>
    <naming-service-url>localhost:1099</naming-service-url>
    </cache-synchronization-manager>
    <event-listener-class>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringServiceSessionEventAdaptor</event-listener-class>
    With 10.1.3 RMIClusteringService is deprecated and replaced by RMITransportManager. A whole bunch of other classes has been added. Has anyone migrated or written RMI custom cache sync code to use RMITransportManager? If so, can they share their experiences and/or send their code samples? Any other thoughts will be appreciated too.
    thanks,
    Prabodh.

  • Issues with TopLink Cache Coordination using JMS for manual DB updates

    Hi,
    We are having 2 web application using same Database and Toplink library but 2 session objects for both the applications. We are using JMS for cache coordination. JMS propagating messages successfully between the applications and able to see the same object changes in both the applications properly. Now, we are trying to refresh cache for manual updates in Database. We are trying to refresh single object which is modified in database in one application, refreshing in one application from which refresh happened but not in other application (JMS publishing the topic but updating one).
    Our intention is refreshing in one application so that JMS should coordinate and update in others when DB manual updates. Please let us know any comments for the same.
    Database using: Oracle 11g
    Toplink Version:- 9.0.3

    See,
    http://www.coderanch.com/t/592919/ORM/databases/Toplink-Cache-coordination-JMS-manual

  • How to use JMS with tomcat and Axis

    Hello
    I'm new in ii, so i'm still a little bit lost. I have been implementing web services with tomcat and Axis. However, these services are synchronous and I would like that some services were asynchronous.
    I've been reading about the topic and I've found that JMS is a good solution for it. I have already downloaded JMS in my computer but now I don't know what else to do. I've been trying to run the SimpleQueueSender.java example but I get the error:
    JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    But I have attached all .jar from F:\Sun\MessageQueue\lib
    In addition to this, for my first webservices I used the Java2WSDL, WSDL2Java and AdminClient (axis tool) to create my web services bindings, stubs and skeletons and to deploy the web service on the server. Do I have to use them now with JMS? or now the deployment must be performed in a different way?
    Thank you in advanced,

    The error means that you have to specify the type and location of your jndi store. You could create a jndi.properties file and put two properties in it:
    java.naming.provider.url=file\\\:////var/jndi
    java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    for a file based jndi store. Then you have to make sure your jndi.properties file is in your CLASSPATH. Then you have to use something like imqadmin to create your jndi store and store in it your administrative objects like Queues and QueueConnectionFactories.

  • Toplink cache synchronization between two nodes using tomcat

    Hi,
    In our appcation we have two nodes. Using websphere we used to synchronize toplink cache between two nodes. Can we do same thing using tomcat.

    Yes, TopLink implements cache synchronization using JMS or RMI easily, which are not dependent on the server being used - though it JMS especially does require a JMS provider that is accessible from each node.  Cache synchronization is now cache coordination, and is described using JPA properties here:
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination
    the Toplink cache synchronization/coordination with JMS | EMBARCADEROS seems to be a good read for cache coordination over JMS, but is more aimed at TopLink's sessions.xml configuration.
    Best Regards,
    Chris

  • JMS & Cache synchronization

    We have setup Toplink to do cache synchronization using Tibco JMS. We are using Tomcat Servlet environment. We are using the pre-login event in Toplink to specify the necessary information required for cache synchronization using JMS. For some reason Toplink connects to JMS using the name "anonymous" in addition to connecting with the user name we specify in the code. Toplink also seems to connect to some queue in addition to the Topic that is mentioned in the code. Does anyone know why Toplink would behave like this?

    Hello,
    TopLink uses JNDI to get the TopicConnectionFactory, and will login using the username/password you have specified. It then calls createTopicConnection() that will use the default userid to get a connection to a Topic, so this could be what you are referring to. The login specified in the cache synch setup is only to access JNDI.
    That said, TopLink does not use a queue that I have ever seen. The source code for the JMSClusteringService is shipped with TopLink and can be used to fill in parts left out of the documentation, as well as allow for customizations. In this case, it would be good to review it to get an understanding of the calls TopLink does to connect. If this does not help, I'd need to see the configuration used to set up cache synchronization.
    Best Regards,
    Chris Delahunt

  • JMS and Data Cache Synchronization

    We have setup Toplink to do cache synchronization using Tibco JMS. For some reason Toplink connects to JMS using the name "anonymous" in addition to connecting with the user name we specify in the code. Toplink also seems to connect to some queue in addition to the Topic that is mentioned in the code. Does anyone know why Toplink would behave like this?

    would not expect TopLink to connect twice at all. Is it possible that another service from within the ApplicationServer is connecting? I would recommend changing the JNDI location or the service port of the TIBCO JMS service and altering the TopLink JMS Clustering Service URL to reflect this change. Then verify that multiple connections are still being acquired.
    --Gordon

  • Cache Synchronization Exception Handling

    I am setting up cache synchronization on WebLogic using JMS. I am looking into writing an exception handler to handle cache synchronization exceptions. The following statement in the documentation caught my attention:
    “As mentioned above, the TopLink cache does not begin the merge or update process until the database transaction has already been committed. This is quite beneficial in that it avoids letting uncommitted data into the shared cache, but should be recognized where transactional synchronization is considered. In cases where a merge may have failed there is no way to roll back the changes made to the database (although it is questionable whether this would be a good idea in any case). As a consequence, failures during remote merging can leave the cache in an inconsistent state. This makes it important to handle any errors that occur by performing cache normalization actions, such as resetting the cache, or even the server.”
    Suppose we have two app server instances, A and B. Instance A commits a change and sends the update notification to instance B. The merge fails on instance B with an optimistic lock exception.
    - I assume that a CacheSynchronizationException will be thrown. Will it be thrown on instance A, B, or both?
    - At this point which cache is inconsistent; A, B, or both?
    - The documentation suggests resetting the cache, but this seems a rather severe way of dealing with the problem. Is it feasible / effective to just refresh the objects in the change set of the CacheSynchronizationException?
    This is a simple exception handler. On receiving a CacheSynchronizationException it resets the cache and re-throws the exception.
    class ToplinkExceptionHandler implements ExceptionHandler{
         public Object handleException(RuntimeException exception) throws DatabaseException{
              if(exception instanceof CacheSynchronizationException){){
                   myServerSession.initializeAllIdentityMaps();
                   throw exception;
              }else{
                   throw exception;
    - Is this approach effective?
    - Once the cache is reset should the exception be re-thrown or should I consider it handled and swallow it? If I do swallow it what should the method return?
    Any advice would be appreciated.

    I had to fix a few errors (in our code) before getting it working. Since I have multiple sessions, I had to specify different multicast ports (actually I used a different multicast address itself) for each of the sessions. I was not setting the announcement delay on one of the sesssions and that was why it was announcing immediately upon coming up. Also I had to explicitly set asynchronous to false because it is true by default.
    BTW, we are not using CMP (entity beans) rather Java Objects. Our deployment has two Apache/Tomcat machines and two WebLogic machines. The WebLogic servers are in a round-robin cluster. The cache synchronization seems to be working fine for this configuration.
    Thanks.
    Anand R

  • More Control of Cache Synchronization in a Cluster?

    If I understand correctly, the cache synchronization manager, by default, sends out a changeSet message to the network for any UOW write commit. Since I have a control on certain objects not using Toplink’s cache, I actually do not need the cache synchronization manger to broadcast any update on these objects. In other words, I do not want the cache synchronization manger to send out the changeSet message to the network if I only update those objects that are configured to always read from the database. In this way, I may be able to avoid some unnecessary changeSet message propagations.
    My question is that whether I have a way, either in sessions.xml or in Java API, to tell the cache synchronization manger not to send out the changeSet message for a given specific UOW write commit (although I still need the data update to be committed to the database).

    Many thanks for the reply and glad to see something better is on the way again!
    If I choose to set the cache synchronization manager to null, do the UOW write for a given class which is always refreshed from the database, and then reset the cache synchronization manger back to the previous instance, do I need to do the following afterwards:
              // must login/re-login to initialize cache synchronization
              if (session.isConnected()) {
                   session.logout();
              session.login();
    to ensure the manager be reset properly?
    Since the propagation of the changeSet message is triggered by the UOW, can I have more control at the UOW level to turn on/off the cache synchronization manager?
    If I understand correctly, in Toplink 10.1.3, I can configure the cache synchronization manger globally at the session level, and also have the option in the same application to set a given number of classes not be cache synchronized in a cluster at the descriptor level to overrule the session global settings. I should not have to choose one over the other. Once these are done in configurations, what is the reason that I still have to choose either to send the changeSet or to invalidate the message?

  • Cache Sync with JMS

    I am running Toplink 9.0.3 with 9i 9.0.2. I cannot get toplink to find the topic declared in jms.xml.
    My sessions.xml and jms.xml file are
    <cache-synchronization-manager>
    <clustering-service>oracle.toplink.remote.jms.JMSClusteringService</clustering-service>
    <should-remove-connection-on-error>true</should-remove-connection-on-error>
    <jms-topic-connection-factory-name>jms/toplinkTopicConnectionFactory</jms-topic-connection-factory-name>
    <jms-topic-name>jms/toplinkCacheSyncTopic</jms-topic-name>
    <naming-service-url>ormi://127.0.0.1</naming-service-url>
    <naming-service-initial-context-factory>com.evermind.server.ApplicationInitialContextFactory</naming-service-initial-context-factory>
    </cache-synchronization-manager>
    jms.xml
    <jms-server port="9127">
    <topic-connection-factory name="ToplinkTopicConnectionFactory" host="127.0.0.1" location="jms/toplinkTopicConnectionFactory">
    <description>Toplink connection factory</description>
    </topic-connection-factory>
    <topic name="ToplinkCacheSyncTopic" location="jms/toplinkCacheSyncTopic">
    <description>Toplink topic</description>
    </topic>
    The error I get is
    EXCEPTION [TOPLINK-8061] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exception
    s.SynchronizationException
    EXCEPTION DESCRIPTION: Could not find JMS Service Topic named: jms/toplinkCacheS
    yncTopic
    INTERNAL EXCEPTION: javax.naming.NamingException: Not in an application scope -
    start Orion with the -userThreads switch if using user-created threads
    at oracle.toplink.exceptions.SynchronizationException.errorLookingUpJMSS
    ervice(Unknown Source)
    at oracle.toplink.remote.jms.JMSClusteringService.retreiveRemoteSessions
    (Unknown Source)
    at oracle.toplink.remote.jms.JMSClusteringService.run(Unknown Source)
    INTERNAL EXCEPTION STACK:
    javax.naming.NamingException: Not in an application scope - start Orion with the
    -userThreads switch if using user-created threads
    at com.evermind.server.PreemptiveApplicationContext.getContext(Preemptiv
    eApplicationContext.java:34)
    at com.evermind.naming.FilterContext.lookup(FilterContext.java:127)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at oracle.toplink.remote.jms.JMSClusteringService.createRemoteConnection
    (Unknown Source)
    at oracle.toplink.remote.jms.JMSClusteringService.retreiveRemoteSessions
    (Unknown Source)
    at oracle.toplink.remote.jms.JMSClusteringService.run(Unknown Source)
    I tried running it without the host,password port and username option but still got the same error.

    The error I get is
    EXCEPTION [TOPLINK-8061] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exception
    s.SynchronizationException
    EXCEPTION DESCRIPTION: Could not find JMS Service Topic named: jms/toplinkCacheS
    yncTopic
    INTERNAL EXCEPTION: javax.naming.NamingException: Not in an application scope -
    start Orion with the -userThreads switch if using user-created threads Did you try starting oc4j with the -userThreads flag?

Maybe you are looking for