|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Why does plexus fail to initialize singleton instance?Hi All,
I use plexus 1.0-alpha-25 formally, it works well, but after update plexus to 1.0-alpha-50-SNAPSHOT, the initilize() of AccountRepositoryHolderDBImpl DOES NOT be executed by container now, do you why? the configuration is as below: <component> <role>net.java.dev.openim.data.storage.AccountRepositoryHolder</role> <role-hint>AccountRepositoryHolder</role-hint> <implementation>net.java.dev.openim.data.storage.AccountRepositoryHolderDBImpl</implementation> <instantiation-strategy>singleton</instantiation-strategy> <configuration> <filename>net.java.dev.openim.data.storage.dao.AccountDAOImp</filename> <regexpSearch>false</regexpSearch> </configuration> </component> |
|
|
Re: Why does plexus fail to initialize singleton instance?Would need to see your POM, but with a version that far back you might
be getting bitten by the component api JAR. In more current versions we have place everything in one JAR. Generally when the lifecycle methods are not being executed it's because the component api is loaded and the same class in the new plexus container JAR is not the same so the instanceof check for a particular lifecycle phase being executed fails and so that lifecycle phase does not run. First make sure that you don't have the component api JAR anywhere. This is usually the cause. On 22-Jul-08, at 4:48 AM, Eric Th wrote: > Hi All, > > I use plexus 1.0-alpha-25 formally, it works well, > but after update plexus to 1.0-alpha-50-SNAPSHOT, > > the initilize() of AccountRepositoryHolderDBImpl DOES NOT be > executed by container now, do you why? > > the configuration is as below: > <component> > > <role>net.java.dev.openim.data.storage.AccountRepositoryHolder</role> > <role-hint>AccountRepositoryHolder</role-hint> > > < > implementation > >net.java.dev.openim.data.storage.AccountRepositoryHolderDBImpl</ > implementation> > > <instantiation-strategy>singleton</instantiation-strategy> > > <configuration> > > <filename>net.java.dev.openim.data.storage.dao.AccountDAOImp</ > filename> > <regexpSearch>false</regexpSearch> > </configuration> > </component> Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven jason at sonatype dot com ---------------------------------------------------------- We all have problems. How we deal with them is a measure of our worth. -- Unknown --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Why does plexus fail to initialize singleton instance?Hi Jason,
When i use Embedder.lookup() to start my app, plexus works well at version 1.0-alpha-25. but when i use DefaultPlexusContainer.lookup() to start app, plexus do not execute the initilize() interface at version 1.0-alpha-50-SNAPSHOT(coz there is not an Embedder in this version). The pom file is as below (relate part): <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>net.java.dev.openim</groupId> <artifactId>openim-plexus-server</artifactId> <version>1.5</version> <name>OpenIM Plexus Server 1.5</name> <packaging>jar</packaging> <repositories> <repository> <id>Plexus</id> <name>Plexus Repository</name> <url>http://repository.codehaus.org/org/codehaus/plexus/</url> <layout>default</layout> </repository> <repository> <id>OpenIM</id> <name>OpenIM Repository</name> <url>http://open-im.net/m2/repository</url> <layout>default</layout> </repository> </repositories> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-container-default</artifactId> <version>1.0-alpha-50-SNAPSHOT</version> </dependency> 2008/7/22 Jason van Zyl <jason@...>: Would need to see your POM, but with a version that far back you might be getting bitten by the component api JAR. In more current versions we have place everything in one JAR. Generally when the lifecycle methods are not being executed it's because the component api is loaded and the same class in the new plexus container JAR is not the same so the instanceof check for a particular lifecycle phase being executed fails and so that lifecycle phase does not run. |
|
|
Re: Why does plexus fail to initialize singleton instance?That's the only dependency you have?
On 22-Jul-08, at 10:05 PM, Eric Th wrote:
Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven jason at sonatype dot com ---------------------------------------------------------- A party which is not afraid of letting culture, business, and welfare go to ruin completely can be omnipotent for a while. -- Jakob Burckhardt |
|
|
Re: Why does plexus fail to initialize singleton instance?The rest content with "plexus" is :
<dependency> <groupId>net.java.dev.openim</groupId> <artifactId>openim-plexus-storage</artifactId> <version>1.5</version> </dependency> <dependency> <groupId>net.java.dev.openim</groupId> <artifactId>openim-plexus-users-manager</artifactId> <version>1.5</version> </dependency> That's all! 2008/7/23 Jason van Zyl <jason@...>:
|
|
|
Re: Why does plexus fail to initialize singleton instance?print the output of mvn dependency:tree to see if there are other plexus jars or if the versions are being altered at build time perhaps? Andy On 23 Jul 2008, at 03:12, Eric Th wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |