0

Can any one explain me what is JNDI.properties file does in Jboss? I'm prefer to know with relate to JBoss AS6 version.

Also what information we can insert and is there any place that we can input the value instead of JNDI.properties file.

user3022123
  • 47
  • 1
  • 9
  • @EelLee, I am asking about Jboss jndi.properties file and what information we put there. we never put database details there but in xx-ds file. As per the sample in the link you gave it says we can link to Database. But I haven't seen my jndi.properties file refer to any database. – user3022123 Dec 04 '13 at 11:16
  • The linked question explains to you what JNDI is and when you should use it. The same explanation applies to your question. If you ask yourself why there is no database in your jndi.properties you should ask a new question. – Angelo Fuchs Feb 28 '14 at 17:14

2 Answers2

0

jndi.properties is mainly used for using clustered jndi services. Follow this link for the detailed explanation of having clustered jndi services.

You can also refer to this post

Community
  • 1
  • 1
Abhijith Nagarajan
  • 3,865
  • 18
  • 23
  • If I don't use clusters then I don't want this file? In any technology I don't need to touch this file? eg. EJB etc. I'm asking because I need to understand the purpose of this file in Jboss. – user3022123 Dec 04 '13 at 11:33
  • This is required only when you are client of clustered JNDI services. – Abhijith Nagarajan Dec 04 '13 at 12:13
  • If I Delete this file should be Ok since I'm not in a clustered environment ? – user3022123 Dec 05 '13 at 13:04
  • If you are sure you are not using any services provided over clustered environment, then you can do it, else keep it as it is. It does not harm anything if you are not using it. – Abhijith Nagarajan Dec 05 '13 at 14:59
  • Thanks Abhijith for the clarification. Can I know what are the ways I can bind objects to the JBoss JNDI? – user3022123 Dec 05 '13 at 15:35
  • What objects do you want to configure in JNDI? If you create datasource in Jboss, then it is automatically available in JNDI so as EJBs. These two cover majority of the cases. Tell us if you have any specific requirement. – Abhijith Nagarajan Dec 05 '13 at 15:44
  • Not a specific. Since we can have name value pair in JNDI we can use this to store application specific properties. – user3022123 Dec 08 '13 at 09:51
  • Though it is possible to store the name-value pair. JNDI is more preferred for resources rather than constants. If you have to use nam-value pair, best is to use the properties file or may be store in a table in database. – Abhijith Nagarajan Dec 09 '13 at 11:44
0

Here you can read about jndi.properties in JBoss AS

http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/The_Naming_InitialContext_Factories-The_ORBInitialContextFactory.html

BTW: DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING :)

andi
  • 240
  • 1
  • 2
  • 10