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
'environm...@http://geronimo.apache.org/xml/ns/deployment-1.2' instead of 'gb...@http://geronimo.apache.org/xml/ns/deployment-1.2' here in element
applicat...@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
'environm...@http://geronimo.apache.org/xml/ns/deployment-1.2' instead of 'gb...@http://geronimo.apache.org/xml/ns/deployment-1.2' here in element
applicat...@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.


Reply via email to