1 2 Previous Next 28 Replies Latest reply on Mar 23, 2006 9:42 AM by manik Go to original post
      • 15. Re: JBossCacheAop Plugin Discussion
        maxandersen

        #1
        I don't think keeping the cache configuration in the plugin storage is a good idea. The file should be in the users projects so they can easily access it and actually use it.

        #2
        If you by bundle mean jbosscaches eclipse bundle then no - that is not possible. The way to do it is to set the current thread context loader before accessing jbosscache with userclasses end then reset it afterwards (reset - is VERY important do to otherwise it will screw up other plugins work ;)

        #3
        sounds cool.

        #4
        cool

        • 16. Re: JBossCacheAop Plugin Discussion

          Couple more comments after our conversation for book keeping:

          1. Cache access. Is it remote access to another instance or create another fresh cache instance (under IDE)

          2. Cache content display.
          a) For plain cache, can use plain reflection to display the fields.

          b) For pojo cache, can retrieve the class name from the internal node. Do a reflection and retrieve the field value from the node. In this case, we don't display the inividual cache node value.

          3. Some cache management like clear cache, e.g.

          • 17. Re: JBossCacheAop Plugin Discussion
            gurkanerdogdu

            Hi;

            I would like to ask some questions that was arised when I have been implementing the new version of the IDE. The problems are appeared when the user jars come into the Eclipse platform, related with the classloaders.

            1- In TreeCache, before I connect to the cache I am setting current thread classloader with newly created classloader that is related with user jars. then in the next operations there is no problems, everything is fine. But I did not grasp the why there is no problem? As far as I understand from the code if fetchstateonstartup() is true, then you will call state generator for the coordinator and integrate it to the cache via the state integrator. When the new cache node added to the cache, you will call remoteMethod with parameter MethodCall actually implemented in JGroup code stack. Then serilization and deserilization occurs with readObject and writeObject.

            2- In TreeCacheAOP, when calling the getObject() with fqn, then I am getting exception with ClassNotFound exception where the exception occurs is in TreeCacheAOPDelegate getObject_(String fqn) with the code
            if (Advised.class.isAssignableFrom(clazz)) {
            try {
            obj = clazz.newInstance();
            // TODO Need to populate the object from the cache as well.
            }
            catch(Exception e) {
            throw new CacheException("failed creating instance of " + clazz.getName(), e);
            }

            Exception class is : org.jboss.aop.AOPManager blabla... not found, becuase clazz object is loaded my custom classloader when I explained in the 1. subject.

            Then I will try to solve this problem with setting the context classloader of the calling thread with my classloader as I did in 1. but problem not solved.

            3- In TreeCacheAOP, if node data is referenced from another node, I can not get the childrens from the referencing node with getChildrens()

            For example;

            put("/a/b",Mary); and Mary has course so tree is /a/b and /a/b/course
            put("/c",Mary) --> this is reference so when getChildren on /c then I am getting nothing. How can I show the /course node under the /c. I want to try to get contents of the /c with getObject() but then 2. problem appears.

            4- I tried to use UserMarshalling option true. I registered my custom class loader with region / and inactiveonstartup false. But then I got java.io.EOF exception from the JGroups.

            4- As a last chance :) I will try to some work that I dropped all cache related jars and user jars from the Eclipse classloader to my custom classloader and use reflection on every cache operations.

            5- In the meanwhile as a remainder,

            - I simplified wizards
            - I put edit and delete configuration
            - I put new view to show the object fields and values.
            - I put object graph shown with tree but this just shows the node name and class within in. For example if a node with fqn /a/b and class Student in it and Student has a course then I am showing like

            /a/b --> Student
            /a/b/course --> Course class

            How can I show the references?

            Thanks
            Gurkan



            • 18. Re: JBossCacheAop Plugin Discussion

              Hi Gurkan..

              It looks like you're having some pretty complex technical issues related to the way JBossCache works, for those questions I'll try to point Ben & Bela to this forum to hopefully get you some answers.

              As far as your classloader errors w/ JBossAOP classes, are the correct jboss aop jars in your classpath? It might be prudent to depend on the JBossAOP core plugin which provides a JBossAOP Classpath container of the latest stable jboss aop release...

              • 19. Re: JBossCacheAop Plugin Discussion
                maxandersen

                if your eclipse plugin uses AOP jars AND they are also on the custom classpath you set you will end up in very weird classloading issues since you will be loading the same classes from different classloader and make the jvm complain.

                • 20. Re: JBossCacheAop Plugin Discussion
                  gurkanerdogdu

                  Manic Comments on the milestone version of the ide

                  Hi all. I've looked at Gurkan Erdogdu's JBoss Cache IDE Milestone 1 release, and have the following comments and thoughts. I'd like to kick off a discussion on this to help pinpoint the requirements better, and as a result help guide Gurkan with further releases of the IDE plugin.

                  Overall

                  - Worked fairly well, integrated with Eclipse (3.1.2) quite easily.
                  - Was hard to 'get started' using it - needs documentation to say that the JBossCacheIDE views need to be enabled in Eclipse.

                  Config Generator



                  - Configuration generator is good, works, but needs a few tweaks/new features:

                  - EvictionPolicy nonexistent
                  - Should have all the Eviction Polcy classes we ship
                  - Should be able to type in a custom eviction policy loader class

                  - Should be able to type in CacheLoader classes for custom cacheloaders
                  - Defaults should have the complete set of cache loaders shipped with JBoss Cache
                  - Configs should be updated to JBC 1.3.0 style cacheloader configs ( i.e. multiple cacheloaders)
                  - Cacheloader preload should have a disabled/none check box
                  - Cacheloader properties should be a text box where users can enter a set of key/value pairs. Important for custom cache loaders.
                  - Perhaps pre-populate this set of key/value pairs for properties required for the cache loaders shipped with JBoss Cache.

                  - Transaction manager lookup drop down should allow for GenericTransactionManagerLookup (default) as well as -- none -- option
                  - Should be able to type in the name of a custom Transaction Manager Lookup.

                  - Other JBoss Cache 1.3.0 options such as NodeLockingScheme
                  - Ability to query org.jboss.cache.Version and hide options not available to specific versions. Also display specific version number of JBoss Cache being used.
                  - Cache configuration file name to default to treecache_generated_by_jbosscache_ide.xml
                  - JGroups group name to default to GENERATED_BY_JBOSSCACHE_IDE
                  - What does the "jar selection" section do?

                  - Config translator - ability to translate a JBoss Cache 1.2.x style configuration into a JBoss Cache 1.3.0 style one.


                  Starting TreeCache/Object Graph/Cache Contents


                  - Ability to start a TreeCache
                  - is this useful?
                  - so what if we can create nodes, we cannot create key/value pairs
                  - what use is the object graph and cache content pane if we cannot put things into the cache?
                  - In general, what is the point of running an instance of the cache in your IDE, which your running code cannot get a reference to?

                  - May make more sense to connect to a running TreeCache instance via JMX

                  - Allows you to view/publish stats of a running system as well as cache contents.

                  • 21. Re: JBossCacheAop Plugin Discussion
                    gurkanerdogdu

                     

                    Conifugration Management


                    - I will take corrections consideration with Manic's comments

                    Starting TreeCache/Object Graph/Cache Contents

                    - Old Functionality 1) Create New Cache Instance and related operations like create new node, remove node etc... in the ide will be removed. Because this disturbs the cache from outside of the cache group.

                    - New Functionality 1 ) Able to create new JBoss Cache project in the ide (this will put all jboss cache related jars into the classpath, create default configuration file etc... in the ide workspace)

                    - New Functionality 2 ) Able to doing operations on remote cache instance in the JBoss AS via JMX. This will give the user to manage JBoss Cache instance MBean operations via the eclipse.What will available operations to the user ? Sample operations may be start cache,stop cache, show contents etc...


                    • 22. Re: JBossCacheAop Plugin Discussion

                      I think remote peruse of contents are definitely useful. We should provide some sort of lazy viewing if possible so user can traverse them on the fly (minizing the traffice spike).

                      Gurkan, have you resolved the aop problem?

                      • 23. Re: JBossCacheAop Plugin Discussion
                        gurkanerdogdu

                         

                        Gurkan, have you resolved the aop problem?


                        Yes, I tried with JBoss Cache 1.2.4 Beta version, it works great and works even with collections great.


                        • 24. Re: JBossCacheAop Plugin Discussion
                          manik

                          Re: JMX, as of 1.3.0, you can even view statistics of a cache group - e.g., number of cache hits and misses, commits and rollbacks, etc.

                          So perhaps you should be able to:

                          1. Connect to a remote cache cluster via JMX
                          2. View stats on the cluster (if running cache >= 1.3.0)
                          3. Walk the tree structure. The TreeCacheMBean has a lot of the same public methods of TreeCache, such as get(). I don't think starting/stopping a cluster makes sense from within Eclipse.

                          And there is the project stuff - like you said, "Start new JBossCache project" sounds very good. This could copy jars and a skeleton jboss cache config file, and could we make it so it launches the config editor when someone double clicks on the jboss cache config file? Perhaps have a 'wizard' and 'src' view, kind of like the Eclipse plugin XML editors?

                          • 25. Re: JBossCacheAop Plugin Discussion
                            gurkanerdogdu

                            Hi all;

                            I have just finished the JBoss Cache IDE Version 1.0. It works with JBoss Cache 1.2.4 SP2. Next service pack for ide will include also JBoss Cache 1.3 capability when JBoss Cache 1.3 releases. Main functionality of the ide as follows:

                            1- Able to create new JBoss Cache 1.2.4 SP2 project in the eclipse workspace. Put all cache dependent libraries to the project classpath and also create default_tree_cache-service.xml file, and open the xml editor to edit created cache service file.

                            2- Able to connect remote working cache instance in the JBoss AS via JMX rmi adaptor. User supplies necessay information (server ip, (jnp)port, cache jndi name). Using JBoss AS rmi adaptor, user is able to connect, disconnect and get cache contents from the remote cache.

                            3- Able to create new cache instances in the local. User supplies default configuration informations in the opened wizard. This gives user to start,stop cache, create,remove new nodes, get contents of the cache etc...

                            Thanks very much for JBoss Cache team and JBoss IDE team for great helping

                            In the next SP of the cache ide, I will also add some operations about the cache, such as cache hits, miss, etc...

                            Cheers;

                            • 26. Re: JBossCacheAop Plugin Discussion
                              manik

                              Nice work. Can we now specify custom cache loaders, eviction policies, etc. in the config editor?

                              • 27. Re: JBossCacheAop Plugin Discussion
                                gurkanerdogdu

                                 

                                Can we now specify custom cache loaders, eviction policies, etc. in the config editor?


                                Hi Manik;

                                I did not add this user specific custom configuration parameters to the wizard area, because the wizard is to complex to understand and manage then. Configuration wizard main usage is to create new cache configuration easily and not consumes so much time of the user. But I put all eviction policies and cache loaders ship with JBoss Cache.

                                But user is able to manage this created configuration file within XML editor and easily add dedicated parameters. In this release, I also corrected xml file structure(pretty print xml structure) for user to easily understand it.

                                Cheers;

                                • 28. Re: JBossCacheAop Plugin Discussion
                                  manik

                                  ok, makes sense. Perhaps for the next release, there could be an 'advanced' button that allows the user to add custom cache loaders, edit jgroups config stack, etc?

                                  What do people think?

                                  1 2 Previous Next