jndi

How can I obtain port binding information at runtime? (JBoss 5.1)

回眸只為那壹抹淺笑 提交于 2019-12-24 08:18:10
问题 Basically what I want to do is to obtain the port number on which JBoss is listening for HTTP requests (the one that is normally 8080). I came upon this article, which sounds promising, but unfortunately some of the links are broken and I cannot figure out the part: ManagementView managementView = getManagementView(); // via JNDI lookup How could I implement getManagementView()? Or is there any other preferable way to do it? 回答1: If you are looking for a simpler interface, you might want to

What does sub error code 568 mean for Ldap Error 49 with Active Directory

旧城冷巷雨未停 提交于 2019-12-24 07:45:44
问题 I am writing some Java code that authenticates to Active Directory using SASL GSSAPI. Mostly this code is working fine but for one user I am getting the response: javax.naming.AuthenticationException: [LDAP: error code 49 - 8 0090304: LdapErr: DSID-0C0904D1, comment: AcceptSecurityContext error, data 568, v1772 ] I know that 49 means this is an authentication failure, and that the relevant sub code is 568, but I am only aware of the following meanings for that data: 525 - user not found 52e -

Spring JNDI datasource - no qualifying bean of type [javax.sql.DataSource] found

限于喜欢 提交于 2019-12-24 05:03:48
问题 I've defined a JDNI resource in tomcat 7, but Spring is failing to inject it. Here's my META-INF/context.xml: <?xml version="1.0" encoding="UTF-8"?> <Context> <Resource name="jdbc/TyedArtDB" auth="Container" driverClassName="org.postgresql.Driver" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" maxActive="10" maxIdle="2" type="javax.sql.DataSource" url="jdbc:postgresql://localhost:5432/tyedart" username="user" password="pass"/> </Context> This is the relevant portion of my web

EJB 3.0 JNDI lookup (Weblogic 10.x)

青春壹個敷衍的年華 提交于 2019-12-24 03:23:38
问题 I use weblogic 10.3.6 and so EJB 3.0. I have EJB and local interface. Both packaged in ejb-jar inside ear. @Local public interface TestLocal { ... } @Stateless public class TestEJB implements TestLocal { ... } To access this EJB from war I have in my web.xml <ejb-local-ref> <ejb-ref-name>ejb/TestLocal</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>testpackage.TestLocal</local> </ejb-local-ref> And lookup looks like test = (TestLocal) new InitialContext().lookup("java:comp/env/ejb

EJB 3.0 JNDI lookup (Weblogic 10.x)

三世轮回 提交于 2019-12-24 03:23:06
问题 I use weblogic 10.3.6 and so EJB 3.0. I have EJB and local interface. Both packaged in ejb-jar inside ear. @Local public interface TestLocal { ... } @Stateless public class TestEJB implements TestLocal { ... } To access this EJB from war I have in my web.xml <ejb-local-ref> <ejb-ref-name>ejb/TestLocal</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>testpackage.TestLocal</local> </ejb-local-ref> And lookup looks like test = (TestLocal) new InitialContext().lookup("java:comp/env/ejb

How can I ensure that the hornet queues are there when my webapp starts in JBOSS 6.0?

删除回忆录丶 提交于 2019-12-24 02:45:23
问题 previous title was: How do I get a JNDI reference to a queue within JBOSS 6 using Spring? I configured a JMS queue like this, which is in a file mytopic-hornetq-jms.xml: <?xml version="1.0" encoding="UTF-8"?> <configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd"> <topic name="mytopic"> <entry name="mytopic"/> </topic> </configuration> My applicationContext.xml looks like this: <?xml version="1.0"

hibernate sessionfactory as a global jndi resource

泄露秘密 提交于 2019-12-23 23:23:21
问题 I have a multiple contexts running in one tomcat instance each context need access to the same database. I am running into problems with cashing because each context has its own instance of hibernate and ehcache at the moment. This seems wrong they should only be one instance of hibernate and ehcache , this would also have better performance. I would like to make a single instance of hibernate session factory available to all contexts, I think this can be done using a global JNDI resource in

@Resource error: “Naming binding already exists for foo.NewServlet/userName in namespace”

自作多情 提交于 2019-12-23 22:52:04
问题 I am looking at using the "@Resource String ..." injection available in servlet 3.0+ containers for providing configuration parameters easily to servlets. I would like for the defaults to work and fail if the key is not present in JNDI (indicating a configuration error) I have toyed with a simple servlet in Netbeans 8.2 with Glassfish 4.1.1 where I would like to have the userName field, and the setFullName(String fullName) set: package foo; import java.io.IOException; import java.io

Accessing Datasource from Outside A Web Container (through JNDI)

こ雲淡風輕ζ 提交于 2019-12-23 22:29:19
问题 I'm trying to access a data source that is defined within a web container (JBoss) from a fat client outside the container. I've decided to look up the data source through JNDI. Actually, my persistence framework (Ibatis) does this. When performing queries I always end up getting this error: java.lang.IllegalAccessException: Method=public abstract java.sql.Connection java.sql.Statement.getConnection() throws java.sql.SQLException does not return Serializable Stacktrace: org.jboss.resource

using a <jee:jndi-lookup string inside an instance of PropertyPlaceholderConfigurer

眉间皱痕 提交于 2019-12-23 18:45:00
问题 Environment: Windows server 2003, Spring 3.0, Tomcat 6 How can I reference a JNDI property inside a PropertyPlaceholderConfigurer? Specifically, I'm using JNDI to look up a java.lang.String that represents a path to a property file needed by my webapp <jee:jndi-lookup id="mypropsfile1" jndi-name="myPropsFile1" resource-ref="true"/> <jee:jndi-lookup id="mypropsfile2" jndi-name="myPropsFile2" resource-ref="true"/> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config