Hi  Kalyan,

About your Datasource lookup issue , Last week I was reviewing this pr [1]
and I saw this in code DS building.
I think your lookup should be: java:global/DS_DB

[1] https://github.com/apache/tomee/pull/488

El jue., 20 jun. 2019 a las 14:41, Kalyan (<kalyanfrem...@gmail.com>)
escribió:

> Hello,
> I have two issues with the jndi lookup.
> I am using kind of a netty server which is our home grown server.
> I used openejb to deploy the ejbs.  I don't have any EAR or WAR file. Its
> jar file with contains the ejb-jar.xml etc..
> The deployment was successful.  The container came up fine.
>
>
> *1 ) Bean lookup issue*
> If you look at the jndi below
>
> Jndi(name=*global/classpath.ear*/SERVICE_EJBs/SyncServiceBean!SyncServiceBeanLocalHome)
>
> --> Ejb(deployment-id=SyncServiceBean)
>
> what's the classpath.ear here?? from where its is coming ? i don't have
> any
> classpath.ear file in my deployment.
>
> I figured out the classpath.ear..  if i set to
> openejb.deployments.classpath.ear=false. It doesn't show up.
>
> I want to lookup the bean using something like sd/SyncServiceBeanSB .
>
> How can i do the mapping ?
>
>
> 2) Datasource lookup issue
>
>     I created a datasource as
>
>      p.put("DS_DB", "new://Resource?type=javax.sql.DataSource");
>         p.put("DS_DB.JdbcDriver", "oracle.jdbc.OracleDriver");
>         p.put("DS_DB.JdbcUrl", "jdbc:oracle:thin:@xxxxxxx:1521/readdb");
>         p.put("DS_DB.UserName", "q1_user");
>         p.put("DS_DB.Password", "XXXXX");
>         p.put("DS_DB.LogSql", "true");
>         p.put("DS_DB.JtaManaged", "true");
>
>      InitialContext initialContext = new InitialContext(p);
>
>   In the code if i try to lookup with DS_DB it doesn't work
>
>     context.lookup("java:/DS_DB")   throws exception
>
>
> But same if i lookup as
>    context("java:openejb:Resource/DS_DB")  it works.
>
> I also tried with the link
>
>     context.bind("java:/DS_DB",new
>                     javax.naming.LinkRef("java:openejb:Resource/DS_DB"));
>
> Even then it doesn't work.
>
> Please help me solve the above two issues..
>
> thanks
> Kalyan
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>


-- 
Atentamente:
César Hernández.

Reply via email to