jndi

EJB3. How JNDI lookup works

元气小坏坏 提交于 2019-12-11 16:51:58
问题 I'm building little framework for data processing with EJB 3. I have Entity Access Object tier which abstracts from data source. Now I need some kind of factory which will give me right bean to query entities. Is it safe to pass looked up through JNDI local bean interfaces as parameters to another local beans? Will each method invocation from this local interface be addressed to the same bean or each call will be passed to different stateless beans as in @EJB occasion? 回答1: You don't have any

Program to create a connection and access IBM MQ 7

我怕爱的太早我们不能终老 提交于 2019-12-11 14:56:59
问题 I have two programs First Program : qManager = serverConfig.qMgr; queueName=serverConfig.qName; this.serverType=serverType; //Factory Settings MQEnvironment.hostname =serverConfig.server; MQEnvironment.port = serverConfig.port; // MQEnvironment.channel = serverConfig.sChannel; MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES);//Connection // Create a connection to the queue manager //qMgr = new MQQueueManager(qManager); Second Program : InitialDirContext ctx = null;

How set jdni.properties on ireport

。_饼干妹妹 提交于 2019-12-11 14:34:20
问题 7.2 with ejbql connection my problem is that when i test the connection, fails because Could not find datasource, in the log says: Caused by: org.hibernate.HibernateException: Could not find datasource Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial I guees can be the jndi.properties that in the wrong directory, i tried put into java_home

Jetty JNDI resource fails: “java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource”

我的未来我决定 提交于 2019-12-11 14:03:32
问题 When I started the Jetty (over Gretty plugin) I get the CNF exception. When I run gradlew :MyWebApplication:appRun -ds > g.log I see following configuration in debug: { "servletContainerId": "jetty9.3", "servletContainerDescription": "Jetty 9.3.25.v20180904", "httpEnabled": true, "httpPort": 8585, "serverConfigFile": "C:\\Users\\user\\eclipse-workspace\\WS\\jetty.xml", "logbackConfigFile": "C:\\Users\\user\\eclipse-workspace\\WS\\MyWebApp\\config\\logback.xml", "loggingLevel": "INFO",

JNDI lookup on Glassfish 4.1.1 custom resources

不打扰是莪最后的温柔 提交于 2019-12-11 11:52:43
问题 I am trying to use JNDI custom resources to store data directly in my server (Glassfish) but it is apparently not working. I define my JNDI as on the image below which corresponds to the following description in my domain.xml. <custom-resource factory-class="org.glassfish.resources.custom.factory.PrimitivesAndStringFactory" res-type="java.lang.String" jndi-name="projectStage"> <property name="value" value="UnitTest"></property> </custom-resource> And then, i am trying to get this value in one

Working with DataSource, JNDI API in IntelliJ

馋奶兔 提交于 2019-12-11 11:03:14
问题 I'm trying to understand establishing a database-connection with a DataSource Object and the JNDI API . I'm working with Intellij UE and have a local Tomcat-8 - and Postgres-Server running. I proceed as mentioned in the Oracle Java Documentation: Creating Instance of DataSource Class and Setting its Properties org.postgresql.ds.PGSimpleDataSource dataSource = new org.postgresql.ds.PGSimpleDataSource(); dataSource.setServerName("localhost"); dataSource.setDatabaseName("db01"); dataSource

Creation of Data source and JNDI, communication in spring MVC application using annotation

青春壹個敷衍的年華 提交于 2019-12-11 10:55:48
问题 I am creating a demo application using Spring mvc 3.0.Now i wants to connect the my application to the data base using "JNDI" and annotations. I am searching on the web,but not find any good example. Hopefully somebody could give me a good link where I could learn step by step for the annotation driven spring mvc application that communicate with the db layer with the help of annotation and JNDI. 回答1: what you need is <jee:jndi-lookup/> check this link http://static.springsource.org/spring

Accesing an remote enterprise bean within a simple Java class

三世轮回 提交于 2019-12-11 10:06:23
问题 Here's my Java class import endpoint.NewSessionRemote; import javax.naming.Context; import javax.naming.InitialContext; public class HelloClient { public static void main(String[] args) { try { Context ctx = new InitialContext(); NewSessionRemote hello = (NewSessionRemote) ctx.lookup("endpoint.NewSessionRemote"); System.out.println(hello.stringChange(4)); } catch (Exception ex) { ex.printStackTrace(); } } } When I run this class I'm getting an exception. javax.naming.NameNotFoundException:

tomcat 7 ( Linux) active directory JNLDIRealm integration

南笙酒味 提交于 2019-12-11 09:44:21
问题 I'm trying to integrate Tomcat 7 (installed on Linux server) with Active Directory,following documentation http://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html I have modified server.xml <Realm className="org.apache.catalina.realm.JNDIRealm" connectionURL="ldap://dc.domain.local:389" connectionName="tc01@domain.local" connectionPassword="password" userBase="CN=Users,DC=domain,DC=Local" userSearch="(&(samAccountName={0})(objectCategory=person)(objectClass=user))" userSubtree="false"

Java - JNDI / Active Directory / Kerberos / WebLogic Server - Password Configuration

天大地大妈咪最大 提交于 2019-12-11 08:37:29
问题 I want to fetch data from an Active Directory using Java and JNDI from my EJB. Doing this search I need to define a user and a password. I was thinking of creating a service account (for my server) in the AD. I will also be using Kerberos protocol and WebLogic Server. As I understand it now, I need to create a keytab file that will contain this service account's credentials. This keytab file will then be configured in the WebLogic Server? So, this means that I will have to state the username