Lalit Awasthi

+ Follow
since Dec 18, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lalit Awasthi

Thanks for the reply

For indirect lookup means suppose I am giving the datasource name as ABCD and I want to bind it in JNDI like Lalit/ABCD then I can give this name indirectly in the websphere server on this place "Environment > Naming > Name Space Bindings ".

I need exactly this situation for JBOSS

Kindly suggest
9 years ago
Hello All

I am migrating a java application from websphere6.0 to Jboss 5.1.
I am facing a problem in Indirect lookup binding .

In webspehere I can find the place in server where I can put my JNDI setting (Environment > Naming > Name Space Bindings > )but I am not able to find this in JBOSS.

Please let me know if anyone can let me know where should I mention the setting for Indirect lookup for JNDIs for Jboss

I have already mentioned the setting in JbossWeb.xml but that is only for Direct lookup.

I will be really thankful to you.



9 years ago
Hello All

Please let me know if anyone can help me in this

9 years ago
Hello Jaikiran

Again Thanks for your reply.

As per your suggestion I checked jmx-console's JNDIView MBean and there I found that is bound to jdbc/abc_datasource.

Let me tell you the problem in detail.

Actually I have an application that was working fine with websphere. But now I am migrating it to JBOSS.

There is database(suppose x) in which other datasources(suppose y,z etc) name are given.

I am able to connect to database x.

Initially when I configured my datasource(for y,z) in oracle-ds.xml with

server Directly binds it to Java:jdbc/abc_datasource.

But the origional datasource name that server should lookup is coming from another database(x) and that is java:comp/enc/jdbc/abc_datasource

so when server looks up for datasource it gets Java:jdbc/abc_datasource in place of java:comp/enc/jdbc/abc_datasource

and code is written in such a way that both sould match ..I can not change my database where the name is like java:comp/enc/jdbc/abc_datasource

Thats why I want to bind the datasource in java:comp/enc/jdbc/abc_datasource format in place of Java:jdbc/abc_datasource this format.

I also get one tag <use-java-context> but by using this I can only add or remove Java: ...

Please help .

9 years ago
Hello Jaikiran

yes exactly I am talking about namespace.mainly I want to bind jdbc/abc_datasource in Java:comp/env/jdbc/abc_datasource namespace but it is not doing so

I can show you the console

[RARDeployment] Required license terms exist, view vfsfile:/C:/Documents%20and%20Settings/All%20Users/jbdevstudio/jboss-eap/
18:48:07,855 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS'
to JNDI name 'java:DefaultDS'
18:48:07,901 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=abc_datasource'
to JNDI name 'java:jdbc/abc_datasource'
18:48:08,042 INFO [TomcatDeployment] deploy, ctxPath=/admin-console

9 years ago
Hello Jaikiran

Thanks for your reply again

I have done changes according to Peter's post bit still I am not able to bind the datasource using Java:comp/env prefix

I am posting all the three files




Please let me know if I am doing anything not coreect

Thanks a lot
9 years ago
Thanks Jaikiran for your quick reply

I have already searched a lot about this topic ..
Everywhere is mentioned about configuring datasource(Jbossweb.xml,web.xml). I am asking about initially when I just configure datasource in oracle-ds.xml and start the server it says

16:59:11,746 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
16:59:11,809 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/abc_datasource' to JNDI name 'java:jdbc/abct_datasource'.

So my question is"is there any xml file where we can change the prefix of binding JNDI as now it is adding "Java:" .I just want to add "Java:com/env".

I got few things about but that did not help

Please suggest


9 years ago
Hi All,
I am trying to migrate a java apllication from Websphere 6.0 to JBOSS 5.1.

I have done all the configuration for datasource connection.

I am facing one problem,I tried to do a lot of permutation and combination so that my JNDI will be initialized with Java:comp/env/XXX but I am not able to apend comp/env in my JNDI.

here is oracle-ds.xml



It directly binds jdbc/abc_datasource to java:jdbc/abc_datasource but I want it to bind jdbc/abc_datasource to java:comp/env/jdbc/abc_datasource

Is there any configuration in any xml or any guidance to this will be highly appreciated.

Lalit Awasthi

9 years ago