[JBoss Messaging Development] New message: "Problems adding a new JMS destination"
by Don Nelson
JBoss development,
A new message was posted in the thread "Problems adding a new JMS destination":
http://community.jboss.org/message/522645#522645
Author : Don Nelson
Profile : http://community.jboss.org/people/dononelson
Message:
--------------------------------------------------------------
Hi all,
I'm trying to add a Topic destination to JMS on JBoss 5.1.0GA. Here is what I added to server/default/deploy/messaging/destinations-service.xml:
<mbean code="org.jboss.jms.server.destination.Topic"
name="jboss.messaging.destination:service=Topic,name=testTopic"
xmbean-dd="xmdesc/Topic-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
</mbean>
And here is the error I get:
vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/messaging/destinations-service.xml -> org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.messaging.destination:service=Topic,name=testTopic
DEPLOYMENTS IN ERROR:
Deployment "vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/messaging/destinations-service.xml" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.jms.server.destination.Topic from BaseClassLoader@1edf351{VFSClassLoaderPolicy@101550f{name=vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/messaging/destinations-service.xml domain=ClassLoaderDomain@92fa70{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@1d15445} roots=[MemoryContextHandler@7832235[path= context=vfsmemory://5c4o01s-hcv2e3-g4yr6ubq-1-g4yr9bsn-9o real=vfsmemory://5c4o01s-hcv2e3-g4yr6ubq-1-g4yr9bsn-9o]] delegates=null exported=[] <IMPORT-ALL>NON_EMPTY}}
Any ideas on what I'm doing wrong?
BTW, I get the same error when I try to create a Topic from the admin console.
Thanks in advance
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522645#522645
14 years, 11 months
[Management Development] New message: "Remote Access to Profile Service"
by Ramesh Reddy
JBoss development,
A new message was posted in the thread "Remote Access to Profile Service":
http://community.jboss.org/message/522620#522620
Author : Ramesh Reddy
Profile : http://community.jboss.org/people/rareddy
Message:
--------------------------------------------------------------
In an another http://community.jboss.org/thread/146571?tstart=0 Emanuel pointed out that
<emanuel>
The link you posted about remote access to ProfileService seems to be out of date. I need to validate that, but AFAIK you don't need to specify the SecureProfileService anymore. Security can be enabled with some server side settings using the same references - i'll update that. Thanks!
</emanuel>
I am running into this above situation now. I can not seem to get a reference to remote Profile Service through "SecureProfileService" reference, and at the same time on "ProfileService" reference I am not sure how to turn on the security on the server side? Can somebody please give me some hints.
There is little blurb in the "profileservice-jboss-beans.xml", I can not seem to make that work.
Thank you.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522620#522620
14 years, 11 months
[JBoss Portal Development] New message: "The server is spending near of 15-20 minutes to boot!!! Why?"
by Javier Alperte
JBoss development,
A new message was posted in the thread "The server is spending near of 15-20 minutes to boot!!! Why?":
http://community.jboss.org/message/522424#522424
Author : Javier Alperte
Profile : http://community.jboss.org/people/xalperte
Message:
--------------------------------------------------------------
Hi,
Is the portal cms preloading (cache) all the repository content at startup?
I don't know if I'm the only one with the following problem but in my case I have a cms with near 60Mb of content (images, files, etc.) and the server is spending near of 15-20 minutes to boot. As you can imagine is really painfull trying to develope in this scenario.
Looking the startup I saw that the problem is in the *org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager*, exactly in the *loadProperties(...)* method. Looking inside this class you can see that the CMS Service is trying to load the entire repository content from database and caching them. What a crazy!!!
Is there any way to disable this behaviour or to improve the boot time? what will be the consequences of non caching all the repository content at startup?
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522424#522424
14 years, 11 months
[JBoss AOP Development] New message: "Re: ClassPool Refactoring"
by Flavia Rainone
JBoss development,
A new message was posted in the thread "ClassPool Refactoring":
http://community.jboss.org/message/522362#522362
Author : Flavia Rainone
Profile : http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
> mailto:kabir.khan@jboss.com wrote:
>
> The only scenario I can think of where this might not happen, is if there are two classpools in the domain loading the same class? CP1 was added to the domain first and contains Class A, and CP2 was added later and also contains Class A. If a) happens for Class A using CP2 then that will be added, but in b) when hitting the domain CP1 will be used first. Maybe we are having problems with classpools not getting unregistered as they should?
I am not sure, because the tests fail even the first time I run the tests against a newly started up AS. Where else would this class be coming from, except from the new ClassPool itself?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522362#522362
14 years, 11 months
[JBoss AOP Development] New message: "Re: ClassPool Refactoring"
by Flavia Rainone
JBoss development,
A new message was posted in the thread "ClassPool Refactoring":
http://community.jboss.org/message/522355#522355
Author : Flavia Rainone
Profile : http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
> mailto:kabir.khan@jboss.com wrote:
>
> > mailto:flavia.rainone@jboss.com wrote:
> > - why is it that calling get on the default domain returns a different version of the same class? This needs further investigation because it is clearly a bug
> Yes, this definitely needs fixing. But I thought we had tests for this already? e.g. this from SimpleDelegatingClassPoolTestCase. I added a few extra checks as indicated to make double sure
>
> *public* *void* testOnePoolPerClassLoadedByA() *throws* Exception
> {
> ClassPoolDomain domain = createClassPoolDomain("SIMPLE", null, *false*);
> ClassPool poolA = createDelegatingClassPool(domain, JAR_A_URL);
> ClassPool poolB = createDelegatingClassPool(domain, JAR_B_URL);
>
> //The first time we access the pool it will create the classes, second time will use the cache
> accessOnePoolPerClassLoadedByA(poolA, poolB);
> accessOnePoolPerClassLoadedByA(poolA, poolB);
> }
>
> private *void* accessOnePoolPerClassLoadedByA(ClassPool poolA, ClassPool poolB) *throws* Exception
> {
> CtClass a = poolA.get(CLASS_A);
> assertEquals(a, poolA.get(CLASS_A));//Added
> assertEquals(a, poolB.get(CLASS_A));//Added
> CtClass b = poolA.get(CLASS_B);
> assertEquals(b, poolA.get(CLASS_B));//Added
> assertEquals(b, poolB.get(CLASS_B));//Added
>
> assertNotSame(a.getClassPool(), b.getClassPool());
> assertEquals(poolA, a.getClassPool());
> assertEquals(poolB, b.getClassPool());
> }
>
>
>
>
For some reason yet to be found, those tests do not replicate what is happening in the tests in AS. I'll have to do more debugging to find out exactly what is going on and then add any tests to jboss-classpool if needed.
> mailto:kabir.khan@jboss.com wrote:
> > mailto:flavia.rainone@jboss.com wrote:
> >
> > - why wasn't the classes cache being used by BaseClassPool.get before? Any reason for this? This has been copied from previous versions, I think that it definetly causes some overhead (the above should work, but it would be faster if the classpool finds out it has already created the class and returns the same class instead of delegating to the domain first).
> I can't see anything in BaseClassPool.get() or get0() regarding this? I think you mean DelegatingClassPool.get0()? I don't see the ClassPool.classes cache being used there either, so maybe I am looking in the wrong place. If I am in the right place, it might be an idea to try to load it locally in the initiating classpool first before hitting the domain if the cachedLookups == null.
>
> //TODO KABIR was synchronized - I don't see why apart from that the standard javassist.ClassPool implementation was synchronized?
> *public* *final* CtClass get0(String classname, *boolean* useCache) *throws* NotFoundException
> {
> //KABIR Made final just to make sure that cached lookups are only handled in one place.
>
> *if* (cachedLookups != *null*)
> {
> CtClass cachedLookup = cachedLookups.get(classname, domain.getModCount());
> *if* (cachedLookup != *null*)
> {
> logger.trace(classname + " was found in the cache of " + *this*);
> *return* cachedLookup;
> }
> }
> *else*
> {
> CtClass cached = getCachedLocally(classname);
> *if* (cached != *null*)
> *return* cached;
> }
>
> ...
> }
>
That's the point I'm saying that, IMO, the first thing that BaseClassPool.get should do is looking in the cache. Currently, it doesn't. That has been done only locally in my machine, and fixed the failing tests. I haven't comitted anything because none of this is 100% validated yet.
> mailto:kabir.khan@jboss.com wrote:
> > mailto:flavia.rainone@jboss.com wrote:
> > - if the cache starts being used as a first step of BaseClassPool.get, as it is in my local fix (not committed yet), is there need for a second level cache as Kabir wrote?
> Yes. It caches all CtClasses looked up by that classpool, and they might come from any classpool in the domain. The cacheLookups of all the classpools in the domain are invalidated when a classpool is added/removed to the domain or its parent domain. Basically, it means that if we look something up in a classpool, we don't need to do all the work in the domain.
I see now. This looks nice . Testing the cache in AS is next in my list.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522355#522355
14 years, 11 months
[JBoss AOP Development] New message: "Re: ClassPool Refactoring"
by Kabir Khan
JBoss development,
A new message was posted in the thread "ClassPool Refactoring":
http://community.jboss.org/message/522345#522345
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
> mailto:flavia.rainone@jboss.com wrote:
>
> A quick update on this: for some reason, the behavior of ClassPool.get method is no longer consistent with ScopedClassPool.getLocally method.
Thinking about this, aside from the performance comments, I don't understand why this would happen? The flow should be as mentioned below
> mailto:flavia.rainone@jboss.com wrote:
>
> The first time AOP asks for a class, during transformation, it knows that the class should be generated by the exact same classpool that corresponds to the classloader that loaded the class, so it uses getLocally.
a) So here the class should be found and added to the classpool's cache in ClassPool.classes
> mailto:flavia.rainone@jboss.com wrote:
>
> The second time AOP asks for the class is during the same transformation (these are actually indirect calls made from inside javassist, during call weaving, for example), the class is retrieved through get. Currently, the classpool delegates the retrieval of the class to the default domain, and the default domain returns a different class.
b) So it delegates to the domain, which goes over all the classpools in the domain and calls loadLocally() on each class. This hits the cache and if not found there tries to load the class locally. When it comes to the classpool in a) it should be found in its ClassPool.classes.
The only scenario I can think of where this might not happen, is if there are two classpools in the domain loading the same class? CP1 was added to the domain first and contains Class A, and CP2 was added later and also contains Class A. If a) happens for Class A using CP2 then that will be added, but in b) when hitting the domain CP1 will be used first. Maybe we are having problems with classpools not getting unregistered as they should?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522345#522345
14 years, 11 months