Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-03 Thread Andreas Schaefer

Hi

I just created a workaround to fix this problem. In
"org.jboss.util.jmx.ObjectNameConverter" contains
these methods (module "common")

conversion:
- convertString(): String of an Object Name -> ObjectName
- convertProperties(): Domain Name + Hashtable Properties -> ObjectName
undo methods:
- getPropertiers(): Object Name plus undo conversion -> Hashtable with
Properties
- getString(): Object Name plus undo conversion -> String of an Object Name

I added this fix to JSR-77 and now we are able to use any characters for the
JSR-77
name. With special thanx to William Hoyle for mentioning the RFC 1738 style
escape
codes.

BTW This fix will not solve your problem AFAIK because EJB JNDI-Names should
be unique.

PLEASE can you provide the entire stacktrace to see where this code fails.
Also can
you tell me which version you are using ?

Thanx - Andy

- Original Message -
From: "colorzhang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 6:40 PM
Subject: [JBoss-dev] ejb-name conflict, help me!!!


> hi all:
>
> sorry post again!
> i have two application(petstore.ear, opc.ear)
> deploy on jboss,
>
> petstore.ear has a ejb named AsyncSenderEJB(ejb-jar.xml)
> opc.ear also has a ejb named AsyncSenderEJB(ejb-jar.xml)
> but they have different jndi-name(jboss.xml)
>
> i have follow errors:
> 2002-05-01 00:16:23,224 ERROR [org.jboss.ejb.EjbModule] Initialization
failed
> javax.management.InstanceAlreadyExistsException:
jboss.j2ee:service=EJB,jndiName=AsyncSenderEJB already registered.
> at
org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:
677)
> at
org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegi
stry.java:247)
> at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> .
> * * *
>
> View thread online:
http://jboss.org/forums/thread.jsp?forum=66&thread=14604
>
> ___
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>
>



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



RE: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread marc fleury

h...

jmx and its sillyness again (all that for the values in the name of JMX).

The problem I have with conversion in general is that we want to be able to
invoke the node from anywhere passing it the MBean name the name is
server:service=ejb,jndiName=theJndiName, which is what scott is refering to
when he says IIOP uses this.

pfff, outside of saying look
server:service=ejb,jndiName=java:/myName is a valid JMX name

we are back in arbitrary land.

JMX ObjectName was a poorly thoughout poorly speced out entity.

If you want my honest opinion, this is the second time we run in issues JUST
with that silly little thing and frankly, it is not the kind of problem that
I find fascinating whether or not : is a valid character...

the translator is the only solution bar making JMX "normal" and less of a
"silly spec compliant". As we are clearly pushing the envelope on JMX, fcuk
silly specs, let's keep what is good and do away with the silly.

marcf

|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of
|Andreas Schaefer
|Sent: Thursday, May 02, 2002 3:52 PM
|To: Scott M Stark; [EMAIL PROTECTED]
|Subject: Re: [JBoss-dev] ejb-name conflict, help me!!!
|
|
|Hi Scott
|
|> Ok, but then we would need a general utility or class to convert back
|> and forth. I don't know how many places actually use the jndiName
|> property to to lookups, but at least the IIOP layer does. Alternatively,
|> you could create a special naming context in JNDI into which the
|> transmed name was bound with a link to the original such the any lookup
|> of the transformed name mapped to the original binding.
|
|OK, will create this conversion tool. To make a create translation we
|need a better translation matrix:
|:->%1
|*->%2
|?->%3
|=->%4
|,->%5
|%->%%
|
|So the conversion back and forth is possible.
|
|Any objects or suggestions ?
|
|Andy
|
|
|
|___
|
|Have big pipes? SourceForge.net is looking for download mirrors. We supply
|the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
|___
|Jboss-development mailing list
|[EMAIL PROTECTED]
|https://lists.sourceforge.net/lists/listinfo/jboss-development


___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread Andreas Schaefer

Hi Scott

> Ok, but then we would need a general utility or class to convert back
> and forth. I don't know how many places actually use the jndiName
> property to to lookups, but at least the IIOP layer does. Alternatively,
> you could create a special naming context in JNDI into which the
> transmed name was bound with a link to the original such the any lookup
> of the transformed name mapped to the original binding.

OK, will create this conversion tool. To make a create translation we
need a better translation matrix:
:->%1
*->%2
?->%3
=->%4
,->%5
%->%%

So the conversion back and forth is possible.

Any objects or suggestions ?

Andy



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread Scott M Stark


Ok, but then we would need a general utility or class to convert back
and forth. I don't know how many places actually use the jndiName
property to to lookups, but at least the IIOP layer does. Alternatively,
you could create a special naming context in JNDI into which the
transmed name was bound with a link to the original such the any lookup
of the transformed name mapped to the original binding.

- Original Message - 
From: "Andreas Schaefer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 02, 2002 2:24 PM
Subject: Re: [JBoss-dev] ejb-name conflict, help me!!!


> Hi Scott
> 
> > The incorporation of jndi names into the ObjectName is going
> > to be a continued source of conflict as jndi names may well
> > include invalid characters(ldap names include both ',' and '=').
> > Can this be done differently?
> 
> I think Davids suggestions to replace this special character:
> '*', ':', '=' and '?' by '%' is the best way to go because JNDI
> name is the only name I can think of to be unique in an app-server.
> 
> Andy



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread Andreas Schaefer

Hi Scott

> The incorporation of jndi names into the ObjectName is going
> to be a continued source of conflict as jndi names may well
> include invalid characters(ldap names include both ',' and '=').
> Can this be done differently?

I think Davids suggestions to replace this special character:
'*', ':', '=' and '?' by '%' is the best way to go because JNDI
name is the only name I can think of to be unique in an app-server.

Andy



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread David Jencks

In the EJBDeployer when we create an object name for the EjbModule we have
some code that fixes urls for use in object names.

  // Create application
  //remove reserved object name letters.  Let's hope no one takes
advantage of the ambiguity.
  String urlname = di.url.toString().replace(':', '%').replace('*',
'%').replace('?', '%').replace(',', '%').replace('=', '%');
  ObjectName ejbModule = ObjectNameFactory.create(EjbModule.BASE_EJB_MODULE_NAME
+ ",url=" + urlname);


On 2002.05.02 15:47:27 -0400 Scott McLaughlin wrote:
> How I got around this in the MailService by just removing the java:/ from
> the jndi name if it exists.
> 
> This may not be the best solution but it does get around object name that
> is not spec compliant.  
> 
> Scott
> * * *
> 
> View thread online: http://jboss.org/forums/thread.jsp?forum=66&thread=14604
> 
> ___
> 
> Have big pipes? SourceForge.net is looking for download mirrors. We
> supply
> the hardware. You get the recognition. Email Us:
> [EMAIL PROTECTED]
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread Scott M Stark

The incorporation of jndi names into the ObjectName is going
to be a continued source of conflict as jndi names may well
include invalid characters(ldap names include both ',' and '=').
Can this be done differently?


Scott Stark
Chief Technology Officer
JBoss Group, LLC

- Original Message -
From: "Scott McLaughlin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 02, 2002 12:47 PM
Subject: Re: [JBoss-dev] ejb-name conflict, help me!!!


> How I got around this in the MailService by just removing the java:/ from
the jndi name if it exists.
>
> This may not be the best solution but it does get around object name that
is not spec compliant.
>
> Scott
> * * *



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread Scott McLaughlin

How I got around this in the MailService by just removing the java:/ from the jndi 
name if it exists.

This may not be the best solution but it does get around object name that is not spec 
compliant.  

Scott
* * *

View thread online: http://jboss.org/forums/thread.jsp?forum=66&thread=14604

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-02 Thread Juha-P Lindfors

On Wed, 1 May 2002, Andreas Schaefer wrote:
> I guess that JBossMX does not provide a fix for that,
> correct ?

no because an object name like that is not spec compliant

-- Juha


___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-01 Thread Andreas Schaefer

Hi Juha, Scott

The mentioned problem is that JMX does not allow
":" in the value of a ObjectName property in the
current spec. Thererfore any "java:" etc. JNDI name
fails.
I guess that JBossMX does not provide a fix for that,
correct ?

Maybe I just have to create a character replacement
like ':' -> '~'. Ugly but I see no other workaround.

Andy

- Original Message - 
From: "Andreas Schaefer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 7:11 PM
Subject: Re: [JBoss-dev] ejb-name conflict, help me!!!


> Hi
> 
> Thanks for the post. I will look into it soon but
> the exception does not prevent you from going
> on.
> 
> Andy




___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] ejb-name conflict, help me!!!

2002-05-01 Thread Andreas Schaefer

Hi

Thanks for the post. I will look into it soon but
the exception does not prevent you from going
on.

Andy

- Original Message -
From: "colorzhang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 6:40 PM
Subject: [JBoss-dev] ejb-name conflict, help me!!!


> hi all:
>
> sorry post again!
> i have two application(petstore.ear, opc.ear)
> deploy on jboss,
>
> petstore.ear has a ejb named AsyncSenderEJB(ejb-jar.xml)
> opc.ear also has a ejb named AsyncSenderEJB(ejb-jar.xml)
> but they have different jndi-name(jboss.xml)
>
> i have follow errors:
> 2002-05-01 00:16:23,224 ERROR [org.jboss.ejb.EjbModule] Initialization
failed
> javax.management.InstanceAlreadyExistsException:
jboss.j2ee:service=EJB,jndiName=AsyncSenderEJB already registered.
> at
org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:
677)
> at
org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegi
stry.java:247)
> at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> .
> * * *
>
> View thread online:
http://jboss.org/forums/thread.jsp?forum=66&thread=14604
>
> ___
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>
>



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] ejb-name conflict, help me!!!

2002-05-01 Thread colorzhang

hi all:

sorry post again!
i have two application(petstore.ear, opc.ear)
deploy on jboss,

petstore.ear has a ejb named AsyncSenderEJB(ejb-jar.xml)
opc.ear also has a ejb named AsyncSenderEJB(ejb-jar.xml)
but they have different jndi-name(jboss.xml)

i have follow errors:
2002-05-01 00:16:23,224 ERROR [org.jboss.ejb.EjbModule] Initialization failed
javax.management.InstanceAlreadyExistsException: 
jboss.j2ee:service=EJB,jndiName=AsyncSenderEJB already registered.
at 
org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:677)
at 
org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:247)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
.
* * *

View thread online: http://jboss.org/forums/thread.jsp?forum=66&thread=14604

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development