You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by recursion <ba...@yahoo.com> on 2009/06/30 13:18:45 UTC

Problem with changing the deployment-id format

Hello dear OpenEJB folks,

I am experiencing some difficulties in trying to switch the value of the
deployment id format. I am starting my OpenEJB remote server with the
following command:
openejb start "-Dopenejb.deploymentId.format={ejbClass}"

Thus, i expect for a bean named "com.recursion.test.openejb.MyStatelessBean"
to have a deployment id with the same value -
"com.recursion.test.openejb.MyStatelessBean". But this doesn't happen!

Let me tell you about what i get from the server.
When i deploy a sample application, i get :

D:\openejb-3.1.1\bin>openejb deploy TestEJB.jar
Application deployed successfully at "TestEJB.jar"
App(id=D:\openejb-3.1.1\apps\TestEJB.jar)
    EjbJar(id=TestEJB.jar, path=D:\openejb-3.1.1\apps\TestEJB.jar)
        Ejb(ejb-name=MyBean, id=org.apache.openejb.jee.StatelessBean)
            Jndi(name=org.apache.openejb.jee.StatelessBeanRemote)

It obviously has done smth very wrong - instead of setting the deployment id
of MyBean to be its ejbClass, it has set it to the value
"org.apache.openejb.jee.StatelessBean". What is this ?! Some bean that
OpenEJB uses internally ? I don't understand it....

And when i try to deploy another application, i get :

Application failed to deploy "app_0_0.ear".  Check server logs for more
details.
org.apache.openejb.OpenEJBException: Jar
D:\openejb-3.1.1\apps\app_0_0\ejb_test_jar.jar cannot be loaded.  The
Deployment ID org.apache.openejb.jee.StatefulBean is already in use.  Please
redeploy this jar and assign a different deployment ID to the bean with the
ejb-name StatefulTxBean.

Please give me some hints how to proceed! Is it a bug ?

I have experimented with other combinations and they don't work either. For
example, starting with 
openejb start "-Dopenejb.deploymentId.format={interfaceClass}{ejbName}", i
get a deployment-id of 
"interfaceClassMyBean" for a bean with beanName=MyBean. This means, that
{interfaceClass} was not processed at all and was just appended to the
beanName as a string constant.

Best Regards,
recursion.
-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24270118.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi Recursion,

It will be available in next 3.1.2 release. The real question is when ?
To be honest I don't know. We want to reduce minor releases.
I will try to check that point with the community ASAP.

Regards,
Jean-Louis


recursion wrote:
> 
> Hi, Jean-Louis,
> 
> Thank you for the fix! Do you know when is it going to be available ? In
> OpenEJB 3.1.2, or maybe sooner ?
> 
> Regards,
> recursion.
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24305427.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by recursion <ba...@yahoo.com>.
Hi, Jean-Louis,

Thank you for the fix! Do you know when is it going to be available ? In
OpenEJB 3.1.2, or maybe sooner ?

Regards,
recursion.
-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24304942.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by recursion <ba...@yahoo.com>.
OK, Jean-Louis,

Thank you! I thought that specifying the jndi format is equally flexible as
specifying the deployment id format, meaning that both can use the same set
of predefined format variables. Seems this is not the case.
I was referring to http://openejb.apache.org/deployment-id.html

Regards,
recursion.
-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24290636.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Recursion,

I will commit the fix ASAP.


recursion wrote:
> 
> I have experimented with other combinations and they don't work either.
> For example, starting with 
> openejb start "-Dopenejb.deploymentId.format={interfaceClass}{ejbName}", i
> get a deployment-id of 
> "interfaceClassMyBean" for a bean with beanName=MyBean. This means, that
> {interfaceClass} was not processed at all and was just appended to the
> beanName as a string constant.
> 

David and I had a discussion yesterday on IRC related to that point.
Just to be clear, {interfaceClass} can't be used with deployment-id pattern
because there is not predictable algorithm applicable to define the
interfaceClass parameter.

Jean-Louis


-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24289932.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Here is the link :  https://issues.apache.org/jira/browse/OPENEJB
https://issues.apache.org/jira/browse/OPENEJB .

Jean-Louis



recursion wrote:
> 
> Hi Jean-Louis,
> 
> Thank you for your fast reply. Can you please paste me the link to the
> OpenEJB JIRA track site ?
> 
> Regards,
> 
> recursion
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24273775.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by recursion <ba...@yahoo.com>.
Sorry to bother you,

I've alredy found it! Issue has been created:
https://issues.apache.org/jira/browse/OPENEJB-1047
-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24273446.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by recursion <ba...@yahoo.com>.
Hi Jean-Louis,

Thank you for your fast reply. Can you please paste me the link to the
OpenEJB JIRA track site ?

Regards,

recursion
-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24273039.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Problem with changing the deployment-id format

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi recursion,

Thanks for sharing that.
I've done a quick test and I'm able to reproduce easily this problem.
I found where is the bug. Can you please open a JIRA ? I gonna create a
patch file.

Jean-Louis




recursion wrote:
> 
> Hello dear OpenEJB folks,
> 
> I am experiencing some difficulties in trying to switch the value of the
> deployment id format. I am starting my OpenEJB remote server with the
> following command:
> openejb start "-Dopenejb.deploymentId.format={ejbClass}"
> 
> Thus, i expect for a bean named
> "com.recursion.test.openejb.MyStatelessBean" to have a deployment id with
> the same value - "com.recursion.test.openejb.MyStatelessBean". But this
> doesn't happen!
> 
> Let me tell you about what i get from the server.
> When i deploy a sample application, i get :
> 
> D:\openejb-3.1.1\bin>openejb deploy TestEJB.jar
> Application deployed successfully at "TestEJB.jar"
> App(id=D:\openejb-3.1.1\apps\TestEJB.jar)
>     EjbJar(id=TestEJB.jar, path=D:\openejb-3.1.1\apps\TestEJB.jar)
>         Ejb(ejb-name=MyBean, id=org.apache.openejb.jee.StatelessBean)
>             Jndi(name=org.apache.openejb.jee.StatelessBeanRemote)
> 
> It obviously has done smth very wrong - instead of setting the deployment
> id of MyBean to be its ejbClass, it has set it to the value
> "org.apache.openejb.jee.StatelessBean". What is this ?! Some bean that
> OpenEJB uses internally ? I don't understand it....
> 
> And when i try to deploy another application, i get :
> 
> Application failed to deploy "app_0_0.ear".  Check server logs for more
> details.
> org.apache.openejb.OpenEJBException: Jar
> D:\openejb-3.1.1\apps\app_0_0\ejb_test_jar.jar cannot be loaded.  The
> Deployment ID org.apache.openejb.jee.StatefulBean is already in use. 
> Please redeploy this jar and assign a different deployment ID to the bean
> with the ejb-name StatefulTxBean.
> 
> Please give me some hints how to proceed! Is it a bug ?
> 
> I have experimented with other combinations and they don't work either.
> For example, starting with 
> openejb start "-Dopenejb.deploymentId.format={interfaceClass}{ejbName}", i
> get a deployment-id of 
> "interfaceClassMyBean" for a bean with beanName=MyBean. This means, that
> {interfaceClass} was not processed at all and was just appended to the
> beanName as a string constant.
> 
> Best Regards,
> recursion.
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-changing-the-deployment-id-format-tp24270118p24272450.html
Sent from the OpenEJB User mailing list archive at Nabble.com.