You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by fladimir <pu...@yahoo.com> on 2009/01/11 17:16:29 UTC

How to get hold of a WorkManager in a web app?

I've tried searching for this a lot, but I haven't found any documentation
yet of any JNDI name for DefaultWorkManager or anything similar.

Any advice? The WorkManager is to be used by a session bean.
-- 
View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21400861.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: How to get hold of a WorkManager in a web app?

Posted by David Jencks <da...@yahoo.com>.
I think that spaces are not legal characters in the query portion of a  
URI so ?name=DefaultWorkManager# (no space after the '=') should work  
better.

thanks
david jencks

On Jan 18, 2009, at 5:20 AM, fladimir wrote:

>
> Unable to set attribute abstractNameQuery to ?name=  
> DefaultWorkManager#
> Here's the full stack trace:
>
> org.apache.geronimo.common.DeploymentException: Unable to set  
> attribute
> abstractNameQuery to ?name= DefaultWorkManager#
> 	at
> org 
> .apache 
> .geronimo 
> .deployment 
> .service.SingleGBeanBuilder.setAttribute(SingleGBeanBuilder.java:90)
> 	at
> org 
> .apache 
> .geronimo 
> .deployment.service.GBeanBuilder.addGBeanData(GBeanBuilder.java:113)
> 	at
> org 
> .apache 
> .geronimo.deployment.service.GBeanBuilder.build(GBeanBuilder.java:98)
> 	at
> org 
> .apache 
> .geronimo 
> .deployment 
> .NamespaceDrivenBuilderCollection 
> .build(NamespaceDrivenBuilderCollection.java:48)
> 	at
> org 
> .apache 
> .geronimo 
> .openejb 
> .deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:539)
> 	at
> org 
> .apache 
> .geronimo 
> .j2ee 
> .deployment 
> .EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at
> org 
> .apache 
> .geronimo 
> .gbean 
> .runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java: 
> 34)
> 	at
> org 
> .apache 
> .geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
> 	at
> org 
> .apache 
> .geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
> 	at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java: 
> 239)
> 	at
> org 
> .apache 
> .geronimo 
> .deployment 
> .plugin 
> .local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
> 	at
> org 
> .apache 
> .geronimo 
> .deployment 
> .plugin 
> .local 
> .RedeployCommand.redeploySameConfiguration(RedeployCommand.java:225)
> 	at
> org 
> .apache 
> .geronimo 
> .deployment.plugin.local.RedeployCommand.run(RedeployCommand.java:101)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by:
> org.apache.geronimo.common.propertyeditor.PropertyEditorException:  
> Illegal
> character in query at index 6: ?name= DefaultWorkManager#
> 	at
> org 
> .apache 
> .geronimo 
> .common 
> .propertyeditor 
> .AbstractNameQueryEditor.getValue(AbstractNameQueryEditor.java:37)
> 	at
> org 
> .apache 
> .geronimo 
> .deployment 
> .service.SingleGBeanBuilder.setAttribute(SingleGBeanBuilder.java:83)
> 	... 19 more
> Caused by: java.net.URISyntaxException: Illegal character in query  
> at index
> 6: ?name= DefaultWorkManager#
> 	at java.net.URI$Parser.fail(URI.java:2809)
> 	at java.net.URI$Parser.checkChars(URI.java:2982)
> 	at java.net.URI$Parser.parseHierarchical(URI.java:3072)
> 	at java.net.URI$Parser.parse(URI.java:3024)
> 	at java.net.URI.<init>(URI.java:578)
> 	at
> org 
> .apache 
> .geronimo 
> .common 
> .propertyeditor 
> .AbstractNameQueryEditor.getValue(AbstractNameQueryEditor.java:35)
> 	... 20 more
>
> -- 
> View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21527752.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: How to get hold of a WorkManager in a web app?

Posted by fladimir <pu...@yahoo.com>.
Unable to set attribute abstractNameQuery to ?name= DefaultWorkManager#
Here's the full stack trace:

org.apache.geronimo.common.DeploymentException: Unable to set attribute
abstractNameQuery to ?name= DefaultWorkManager#
	at
org.apache.geronimo.deployment.service.SingleGBeanBuilder.setAttribute(SingleGBeanBuilder.java:90)
	at
org.apache.geronimo.deployment.service.GBeanBuilder.addGBeanData(GBeanBuilder.java:113)
	at
org.apache.geronimo.deployment.service.GBeanBuilder.build(GBeanBuilder.java:98)
	at
org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection.build(NamespaceDrivenBuilderCollection.java:48)
	at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:539)
	at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
	at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
	at
org.apache.geronimo.deployment.plugin.local.RedeployCommand.redeploySameConfiguration(RedeployCommand.java:225)
	at
org.apache.geronimo.deployment.plugin.local.RedeployCommand.run(RedeployCommand.java:101)
	at java.lang.Thread.run(Thread.java:619)
Caused by:
org.apache.geronimo.common.propertyeditor.PropertyEditorException: Illegal
character in query at index 6: ?name= DefaultWorkManager#
	at
org.apache.geronimo.common.propertyeditor.AbstractNameQueryEditor.getValue(AbstractNameQueryEditor.java:37)
	at
org.apache.geronimo.deployment.service.SingleGBeanBuilder.setAttribute(SingleGBeanBuilder.java:83)
	... 19 more
Caused by: java.net.URISyntaxException: Illegal character in query at index
6: ?name= DefaultWorkManager#
	at java.net.URI$Parser.fail(URI.java:2809)
	at java.net.URI$Parser.checkChars(URI.java:2982)
	at java.net.URI$Parser.parseHierarchical(URI.java:3072)
	at java.net.URI$Parser.parse(URI.java:3024)
	at java.net.URI.<init>(URI.java:578)
	at
org.apache.geronimo.common.propertyeditor.AbstractNameQueryEditor.getValue(AbstractNameQueryEditor.java:35)
	... 20 more

-- 
View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21527752.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: How to get hold of a WorkManager in a web app?

Posted by fladimir <pu...@yahoo.com>.
Thanks a lot, everything works now :)
-- 
View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21562764.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: How to get hold of a WorkManager in a web app?

Posted by David Jencks <da...@yahoo.com>.
I think there might be a bug in our jndi implementation so you have to  
look up java:/DefaultWorkManager.  If this doesn't help I'll look  
further.

thanks
david jencks

On Jan 18, 2009, at 12:17 PM, fladimir wrote:

>
> Yes, I actually guessed something like that when I checked the full  
> stack
> trace.
>
> Thanks a lot, it deploys now fine. But the name is not found:
>
> Caused by: javax.naming.NameNotFoundException: java:DefaultWorkManager
> 	at
> org 
> .apache 
> .xbean.naming.context.AbstractContext.lookup(AbstractContext.java:169)
> 	at
> org 
> .apache 
> .xbean.naming.context.AbstractContext.lookup(AbstractContext.java:603)
> 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
>
> In:
>
> InitialContext initialContext = new InitialContext();
> Object workManager = initialContext.lookup("java:DefaultWorkManager");
> LOG.info("WORKMANAGER: " + workManager);
>
> Any advice what name I should try? I guess it should be in  
> InitialContext,
> no?
> -- 
> View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21532415.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: How to get hold of a WorkManager in a web app?

Posted by fladimir <pu...@yahoo.com>.
Yes, I actually guessed something like that when I checked the full stack
trace.

Thanks a lot, it deploys now fine. But the name is not found:

Caused by: javax.naming.NameNotFoundException: java:DefaultWorkManager
	at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:169)
	at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:603)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)

In:

InitialContext initialContext = new InitialContext();
Object workManager = initialContext.lookup("java:DefaultWorkManager");
LOG.info("WORKMANAGER: " + workManager);

Any advice what name I should try? I guess it should be in InitialContext,
no?
-- 
View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21532415.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: How to get hold of a WorkManager in a web app?

Posted by fladimir <pu...@yahoo.com>.


djencks wrote:
> 
> 
> On Jan 14, 2009, at 8:38 AM, fladimir wrote:
> 
>>
>> Unfortunately I couldn't get it to work. I'm really new to gbeans,  
>> though...
>> Maybe someone here (developer?) knows how this is supposed to be done?
>>
>> First I tried putting it inside the <application> root tag and it  
>> gave me:
>>
>> org.apache.xmlbeans.XmlException: Invalid deployment descriptor:  
>> errors:
>>
>> jar:file:/home/apollo/software/geronimo-tomcat6-javaee5-2.1.3/var/ 
>> temp/geronimo-deployer59214.tmpdir/lobby.ear!/META-INF/geronimo- 
>> application.xml:6:1:
>> error: cvc-complex-type.2.4a: Expected element
>> 'environment@http://geronimo.apache.org/xml/ns/deployment-1.2'  
>> instead of
>> 'gbean@http://geronimo.apache.org/xml/ns/deployment-1.2' here in  
>> element
>> application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>>
>> jar:file:/home/apollo/software/geronimo-tomcat6-javaee5-2.1.3/var/ 
>> temp/geronimo-deployer59214.tmpdir/lobby.ear!/META-INF/geronimo- 
>> application.xml:22:4:
>> error: cvc-complex-type.2.4a: Expected element
>> 'environment@http://geronimo.apache.org/xml/ns/deployment-1.2'  
>> instead of
>> 'gbean@http://geronimo.apache.org/xml/ns/deployment-1.2' here in  
>> element
>> application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
> 
> Should work if its the last element... although I'd expect you'd get  
> the same exception as in the openejb-jar.xml.
> 
>>
>>
>>
>> Same happened when I tried putting it inside <module>.
> 
> that won't work
> 
>> Then I tried putting
>> it inside <openejb-jar> and it gave me:
>>
>> Unable to set attribute abstractNameQuery to ?name=  
>> DefaultWorkManager#
>> org.apache.geronimo.common.DeploymentException: Unable to set  
>> attribute
>> abstractNameQuery to ?name= DefaultWorkManager#
>> 	at
>> org 
>> .apache 
>> .geronimo 
>> .deployment 
>> .service.SingleGBeanBuilder.setAttribute(SingleGBeanBuilder.java:90)
> 
> Is there another exception, the cause, in the stack trace?  If so, if  
> you show the complete stack trace we might be able to diagnose the  
> problem.
> 
> thanks
> david jencks
> 
> 
>>
>>
>> I tried putting the gbean-definition in config.xml, inside the module:
>>
>>    <module name="************/car">
>>        <gbean name="WorkManagerBinding">
>>            <attribute name="name">DefaultWorkManager</attribute>
>>            <attribute name="abstractNameQuery">?name=
>> DefaultWorkManager#</attribute>
>>            <reference name="Context"/>
>>        </gbean>
>>    </module>
>>
>> and I got:
>>
>> org.apache.geronimo.kernel.config.InvalidConfigException: New GBeans  
>> must be
>> specified with a GBeanInfo and a full AbstractName  
>> configuration=designfa
>> ctory/lobby/0.2.0/car gbeanName=WorkManagerBinding
>>
>> Any help?
>>
>>
>> djencks wrote:
>>>
>>> I assume you are talking about the j2ca work manager we've had for a
>>> long time rather than a newer choice -- I think the ee concurrent  
>>> spec
>>> may also have a work manager and I don't know about ejb 3.1.
>>>
>>> The default work manager isn't bound in jndi right now.  To bind it
>>> you can include a binding gbean like we use for the transaction
>>> manager -- see the plan at plugins/connector/transaction/src/main/ 
>>> plan/
>>> plan.xml or inside the transaction car.  I think yours will look like
>>> this:
>>>
>>>     <gbean name="WorkManagerBinding"
>>> class="org.apache.geronimo.gjndi.binding.GBeanBinding">
>>>         <attribute name="name">DefaultWorkManager</attribute>
>>>         <attribute name="abstractNameQuery">?name=
>>> DefaultWorkManager#</attribute>
>>>         <reference name="Context">
>>>             <name>JavaContext</name>
>>>         </reference>
>>>     </gbean>
>>>
>>> I think the work manager will then be at java:DefaultWorkManager
>>>
>>> I think you can put this gbean in your geronimo plan for your web app
>>> although there might be ordering issues if you try to look it up
>>> during servlet initialization... you could experiment.
>>>
>>> thanks
>>> david jencks
>>>
>>>
>>> On Jan 11, 2009, at 8:16 AM, fladimir wrote:
>>>
>>>>
>>>> I've tried searching for this a lot, but I haven't found any
>>>> documentation
>>>> yet of any JNDI name for DefaultWorkManager or anything similar.
>>>>
>>>> Any advice? The WorkManager is to be used by a session bean.
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21400861.html
>>>> Sent from the Apache Geronimo - Users mailing list archive at
>>>> Nabble.com.
>>>>
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21459715.html
>> Sent from the Apache Geronimo - Users mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21527766.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: How to get hold of a WorkManager in a web app?

Posted by David Jencks <da...@yahoo.com>.
On Jan 14, 2009, at 8:38 AM, fladimir wrote:

>
> Unfortunately I couldn't get it to work. I'm really new to gbeans,  
> though...
> Maybe someone here (developer?) knows how this is supposed to be done?
>
> First I tried putting it inside the <application> root tag and it  
> gave me:
>
> org.apache.xmlbeans.XmlException: Invalid deployment descriptor:  
> errors:
>
> jar:file:/home/apollo/software/geronimo-tomcat6-javaee5-2.1.3/var/ 
> temp/geronimo-deployer59214.tmpdir/lobby.ear!/META-INF/geronimo- 
> application.xml:6:1:
> error: cvc-complex-type.2.4a: Expected element
> 'environment@http://geronimo.apache.org/xml/ns/deployment-1.2'  
> instead of
> 'gbean@http://geronimo.apache.org/xml/ns/deployment-1.2' here in  
> element
> application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> jar:file:/home/apollo/software/geronimo-tomcat6-javaee5-2.1.3/var/ 
> temp/geronimo-deployer59214.tmpdir/lobby.ear!/META-INF/geronimo- 
> application.xml:22:4:
> error: cvc-complex-type.2.4a: Expected element
> 'environment@http://geronimo.apache.org/xml/ns/deployment-1.2'  
> instead of
> 'gbean@http://geronimo.apache.org/xml/ns/deployment-1.2' here in  
> element
> application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0

Should work if its the last element... although I'd expect you'd get  
the same exception as in the openejb-jar.xml.

>
>
>
> Same happened when I tried putting it inside <module>.

that won't work

> Then I tried putting
> it inside <openejb-jar> and it gave me:
>
> Unable to set attribute abstractNameQuery to ?name=  
> DefaultWorkManager#
> org.apache.geronimo.common.DeploymentException: Unable to set  
> attribute
> abstractNameQuery to ?name= DefaultWorkManager#
> 	at
> org 
> .apache 
> .geronimo 
> .deployment 
> .service.SingleGBeanBuilder.setAttribute(SingleGBeanBuilder.java:90)

Is there another exception, the cause, in the stack trace?  If so, if  
you show the complete stack trace we might be able to diagnose the  
problem.

thanks
david jencks


>
>
> I tried putting the gbean-definition in config.xml, inside the module:
>
>    <module name="************/car">
>        <gbean name="WorkManagerBinding">
>            <attribute name="name">DefaultWorkManager</attribute>
>            <attribute name="abstractNameQuery">?name=
> DefaultWorkManager#</attribute>
>            <reference name="Context"/>
>        </gbean>
>    </module>
>
> and I got:
>
> org.apache.geronimo.kernel.config.InvalidConfigException: New GBeans  
> must be
> specified with a GBeanInfo and a full AbstractName  
> configuration=designfa
> ctory/lobby/0.2.0/car gbeanName=WorkManagerBinding
>
> Any help?
>
>
> djencks wrote:
>>
>> I assume you are talking about the j2ca work manager we've had for a
>> long time rather than a newer choice -- I think the ee concurrent  
>> spec
>> may also have a work manager and I don't know about ejb 3.1.
>>
>> The default work manager isn't bound in jndi right now.  To bind it
>> you can include a binding gbean like we use for the transaction
>> manager -- see the plan at plugins/connector/transaction/src/main/ 
>> plan/
>> plan.xml or inside the transaction car.  I think yours will look like
>> this:
>>
>>     <gbean name="WorkManagerBinding"
>> class="org.apache.geronimo.gjndi.binding.GBeanBinding">
>>         <attribute name="name">DefaultWorkManager</attribute>
>>         <attribute name="abstractNameQuery">?name=
>> DefaultWorkManager#</attribute>
>>         <reference name="Context">
>>             <name>JavaContext</name>
>>         </reference>
>>     </gbean>
>>
>> I think the work manager will then be at java:DefaultWorkManager
>>
>> I think you can put this gbean in your geronimo plan for your web app
>> although there might be ordering issues if you try to look it up
>> during servlet initialization... you could experiment.
>>
>> thanks
>> david jencks
>>
>>
>> On Jan 11, 2009, at 8:16 AM, fladimir wrote:
>>
>>>
>>> I've tried searching for this a lot, but I haven't found any
>>> documentation
>>> yet of any JNDI name for DefaultWorkManager or anything similar.
>>>
>>> Any advice? The WorkManager is to be used by a session bean.
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21400861.html
>>> Sent from the Apache Geronimo - Users mailing list archive at
>>> Nabble.com.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21459715.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: How to get hold of a WorkManager in a web app?

Posted by fladimir <pu...@yahoo.com>.
Unfortunately I couldn't get it to work. I'm really new to gbeans, though...
Maybe someone here (developer?) knows how this is supposed to be done?

First I tried putting it inside the <application> root tag and it gave me:

org.apache.xmlbeans.XmlException: Invalid deployment descriptor: errors:

jar:file:/home/apollo/software/geronimo-tomcat6-javaee5-2.1.3/var/temp/geronimo-deployer59214.tmpdir/lobby.ear!/META-INF/geronimo-application.xml:6:1:
error: cvc-complex-type.2.4a: Expected element
'environment@http://geronimo.apache.org/xml/ns/deployment-1.2' instead of
'gbean@http://geronimo.apache.org/xml/ns/deployment-1.2' here in element
application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0

jar:file:/home/apollo/software/geronimo-tomcat6-javaee5-2.1.3/var/temp/geronimo-deployer59214.tmpdir/lobby.ear!/META-INF/geronimo-application.xml:22:4:
error: cvc-complex-type.2.4a: Expected element
'environment@http://geronimo.apache.org/xml/ns/deployment-1.2' instead of
'gbean@http://geronimo.apache.org/xml/ns/deployment-1.2' here in element
application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0


Same happened when I tried putting it inside <module>. Then I tried putting
it inside <openejb-jar> and it gave me:

Unable to set attribute abstractNameQuery to ?name= DefaultWorkManager#
org.apache.geronimo.common.DeploymentException: Unable to set attribute
abstractNameQuery to ?name= DefaultWorkManager#
	at
org.apache.geronimo.deployment.service.SingleGBeanBuilder.setAttribute(SingleGBeanBuilder.java:90)

I tried putting the gbean-definition in config.xml, inside the module:

    <module name="************/car">
        <gbean name="WorkManagerBinding">
            <attribute name="name">DefaultWorkManager</attribute>
            <attribute name="abstractNameQuery">?name=
DefaultWorkManager#</attribute>
            <reference name="Context"/>
        </gbean>
    </module>

and I got:

org.apache.geronimo.kernel.config.InvalidConfigException: New GBeans must be
specified with a GBeanInfo and a full AbstractName configuration=designfa
ctory/lobby/0.2.0/car gbeanName=WorkManagerBinding

Any help?


djencks wrote:
> 
> I assume you are talking about the j2ca work manager we've had for a  
> long time rather than a newer choice -- I think the ee concurrent spec  
> may also have a work manager and I don't know about ejb 3.1.
> 
> The default work manager isn't bound in jndi right now.  To bind it  
> you can include a binding gbean like we use for the transaction  
> manager -- see the plan at plugins/connector/transaction/src/main/plan/ 
> plan.xml or inside the transaction car.  I think yours will look like  
> this:
> 
>      <gbean name="WorkManagerBinding"  
> class="org.apache.geronimo.gjndi.binding.GBeanBinding">
>          <attribute name="name">DefaultWorkManager</attribute>
>          <attribute name="abstractNameQuery">?name=  
> DefaultWorkManager#</attribute>
>          <reference name="Context">
>              <name>JavaContext</name>
>          </reference>
>      </gbean>
> 
> I think the work manager will then be at java:DefaultWorkManager
> 
> I think you can put this gbean in your geronimo plan for your web app  
> although there might be ordering issues if you try to look it up  
> during servlet initialization... you could experiment.
> 
> thanks
> david jencks
> 
> 
> On Jan 11, 2009, at 8:16 AM, fladimir wrote:
> 
>>
>> I've tried searching for this a lot, but I haven't found any  
>> documentation
>> yet of any JNDI name for DefaultWorkManager or anything similar.
>>
>> Any advice? The WorkManager is to be used by a session bean.
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21400861.html
>> Sent from the Apache Geronimo - Users mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21459715.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: How to get hold of a WorkManager in a web app?

Posted by David Jencks <da...@yahoo.com>.
I assume you are talking about the j2ca work manager we've had for a  
long time rather than a newer choice -- I think the ee concurrent spec  
may also have a work manager and I don't know about ejb 3.1.

The default work manager isn't bound in jndi right now.  To bind it  
you can include a binding gbean like we use for the transaction  
manager -- see the plan at plugins/connector/transaction/src/main/plan/ 
plan.xml or inside the transaction car.  I think yours will look like  
this:

     <gbean name="WorkManagerBinding"  
class="org.apache.geronimo.gjndi.binding.GBeanBinding">
         <attribute name="name">DefaultWorkManager</attribute>
         <attribute name="abstractNameQuery">?name=  
DefaultWorkManager#</attribute>
         <reference name="Context">
             <name>JavaContext</name>
         </reference>
     </gbean>

I think the work manager will then be at java:DefaultWorkManager

I think you can put this gbean in your geronimo plan for your web app  
although there might be ordering issues if you try to look it up  
during servlet initialization... you could experiment.

thanks
david jencks


On Jan 11, 2009, at 8:16 AM, fladimir wrote:

>
> I've tried searching for this a lot, but I haven't found any  
> documentation
> yet of any JNDI name for DefaultWorkManager or anything similar.
>
> Any advice? The WorkManager is to be used by a session bean.
> -- 
> View this message in context: http://www.nabble.com/How-to-get-hold-of-a-WorkManager-in-a-web-app--tp21400861s134p21400861.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>