Hi,

Your change looks fine to me, although I am a
bit confused as to why updating the system
properties is needed here: That is also done
in the org.jboss.naming.NamingService when its
initService() method is run.
Anyway, I cannot see how it could hurt to do
it here. And by doing it here, this service
would not depend on the NamingService having
been initialized.


Best Regards,

Ole Husgaard.


Darius Davidavicius wrote:
> 
> Hi all,
> 
> I do testing Jboss 2.3 compiled with JDK1.4beta
> 
> Problem:
> I need Jboss application naming service be not on default 1099 port because in my 
>system we use telephony system by Dialogic where port 1099 is
> hardcoded.
> When i was using JBoss 2.1, 2.2 i just was changing jboss.jcml where :
>   <!-- ==================================================================== -->
>   <!-- JNDI                                                                 -->
>   <!-- ==================================================================== -->
>   <mbean code="org.jboss.naming.NamingService" name="DefaultDomain:service=Naming">
>     <attribute name="Port">1100</attribute>
>   </mbean>
>   <mbean code="org.jboss.naming.JNDIView" name="DefaultDomain:service=JNDIView" />
> 
> Now it does not work because of exceptions (connection refused) in the 
>ClientUserTransactionService.java :: startService() line:
>  ctx.bind(FACTORY_NAME, factory) .
> 
> Fix proposal:
>     protected void startService()
>       throws Exception
>    {
>       
>System.getProperties().load(Thread.currentThread().getContextClassLoader().getResourceAsStream("jndi.properties"));
>       factory = new UserTransactionSessionFactoryImpl();
> 
>       Context ctx = new InitialContext();
>       ctx.bind(FACTORY_NAME, factory);
>       ctx.bind(JNDI_NAME, ClientUserTransaction.getSingleton());
>    }
> 
> In such case i change jboss.jcml like example above and in the jndi.porperties i can 
>do - java.naming.provider.url=localhost:1100
> 
> I dont know if such fix dont have side efect somewhere else but in my case it works 
>fine.
> 
> Regards,
> 
> Darius Davidavicius
> www.jbees.com
> J2EE consultations, development
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to