You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Zhang JinYan (JIRA)" <ji...@apache.org> on 2011/09/19 09:18:08 UTC

[jira] [Created] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
---------------------------------------------------------------------------------

                 Key: VYSPER-294
                 URL: https://issues.apache.org/jira/browse/VYSPER-294
             Project: VYSPER
          Issue Type: Bug
          Components: core protocol
    Affects Versions: 0.8
         Environment: no special environment
            Reporter: Zhang JinYan


1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
Code:
    protected void createCache(String configFile) {
        if (configFile == null) {
            configFile = DEFAULT_EHCACHE_CONFIG_FILE;
        }
        URL configFileURL = getClass().getResource(configFile);
        if (configFileURL == null) {
            throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
        }
        CacheManager.create();  //<============== Here i am!

        presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
        jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
    }

2、dist/src/main/assembly/src.xml
Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
      <excludes>
        <exclude>**/target/**</exclude>
        <exclude>.*</exclude>
        <exclude>.*/**</exclude> //<============== Here i am!
        <exclude>**.bak</exclude>
      </excludes>

I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Attachment:     (was: xmpp.patch)

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Attachment: xmpp.patch

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Attachment:     (was: xmpp.patch)

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Comment: was deleted

(was: path for the bugs)

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>            Assignee: Ashish Paliwal
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Ashish Paliwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107674#comment-13107674 ] 

Ashish Paliwal commented on VYSPER-294:
---------------------------------------

Good Catch. My bad, I missed this.

Shall push in the patch soon. Thanks !

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Attachment: xmpp.patch

path for the bugs

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Attachment:     (was: xmpp.patch)

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Reopened] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan reopened VYSPER-294:
---------------------------------


The resolution still have some problem

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>            Assignee: Ashish Paliwal
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Attachment: xmpp.patch

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Ashish Paliwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108352#comment-13108352 ] 

Ashish Paliwal commented on VYSPER-294:
---------------------------------------

Looking into it.

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>            Assignee: Ashish Paliwal
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Assigned] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Ashish Paliwal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Paliwal reassigned VYSPER-294:
-------------------------------------

    Assignee: Ashish Paliwal

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>            Assignee: Ashish Paliwal
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang JinYan updated VYSPER-294:
--------------------------------

    Attachment: xmpp.patch

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Ashish Paliwal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Paliwal resolved VYSPER-294.
-----------------------------------

    Resolution: Fixed

Applied the patch, and added test case to test the same

> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>            Assignee: Ashish Paliwal
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (VYSPER-294) EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in

Posted by "Zhang JinYan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VYSPER-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108348#comment-13108348 ] 

Zhang JinYan commented on VYSPER-294:
-------------------------------------

Thanks for your rapid resolution:)
But the resolution still has some problem.

java doc for CacheManager.create(URL configurationFileURL):
    A factory method to create a singleton CacheManager from an URL. 

This method is used to initialize the singlton instance.
If CacheManager is initialized somewhere else, then call this method will not re-initialize the singlton again.
All  CacheManager's static method is operating on the singlton.
e.g.
    I want to extend Vysper, and i use EhCache too.
    I have two EhCache config file:  ehcache.xml  and  ehcache-vysper.xml ("PresenceCache" is configure  in this file)
    In my extension, i used the default config file: ehcache.xml  
    And i want config the EhCachePresenceCacheImpl to use ehcache-vysper.xml, but this make no sense.
    When vysper running,exception may throw out: presenceCache is null.

That's why i replace xmpp.patch again and again.
I'm sorry for my stupid operation, make this issue page a mess.

My final patch is :
    If the passed in configFile is null, then use CacheManager.getInstance() to get the singlton directly, which will be initialized with the default ehcache.xml.
   If else, i use the special configFile to create a new CacheManager.

You can find more detail  in my xmpp.path file.



> EhCachePresenceCacheImpl initialize CacheManager not use the configFile passed in
> ---------------------------------------------------------------------------------
>
>                 Key: VYSPER-294
>                 URL: https://issues.apache.org/jira/browse/VYSPER-294
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.8
>         Environment: no special environment
>            Reporter: Zhang JinYan
>            Assignee: Ashish Paliwal
>              Labels: patch
>         Attachments: xmpp.patch
>
>
> 1、The EhCachePresenceCacheImpl has a constructor arg, which specify the configFile used to initialize a EhCache CacheManager,but didn't use it at last.
> Code:
>     protected void createCache(String configFile) {
>         if (configFile == null) {
>             configFile = DEFAULT_EHCACHE_CONFIG_FILE;
>         }
>         URL configFileURL = getClass().getResource(configFile);
>         if (configFileURL == null) {
>             throw new RuntimeException("ehcache configuration file ehcache.xml not found on classpath");
>         }
>         CacheManager.create();  //<============== Here i am!
>         presenceCache = CacheManager.getInstance().getCache(PRESENCE_CACHE);
>         jidPresenceCache = CacheManager.getInstance().getCache(JID_PRESENCE_CACHE);
>     }
> 2、dist/src/main/assembly/src.xml
> Didn't excludes .* file/folde in sub directory. If i use eclipse to import those projects, there will create .* files (eclipse project files,eg: .classpath)
>       <excludes>
>         <exclude>**/target/**</exclude>
>         <exclude>.*</exclude>
>         <exclude>.*/**</exclude> //<============== Here i am!
>         <exclude>**.bak</exclude>
>       </excludes>
> I upload my patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira