jndi

Obtaining an IntialContext from Weblogic without using clear text password

橙三吉。 提交于 2020-01-04 04:33:12
问题 I can obtain the Weblogic InitialContext from a JNDI Client using the following properties as the Environment parameters for InitialContext Hashtable jndiProps = new Hashtable(); jndiProps.put("java.naming.factory.initial", "t3://localhost:7001"); jndiProps.put("java.naming.provider.url", "weblogic.jndi.WLInitialContextFactory"); jndiProps.put("java.naming.security.principal", "weblogic"); jndiProps.put("java.naming.security.credentials", "weblogic"); InitialContext ctx = new InitialContext

Java JNDI Name java:/

心已入冬 提交于 2020-01-03 16:50:02
问题 I'm following the tutorial: https://docs.oracle.com/javase/tutorial/jndi/index.html My adventure started while setting a JNDI name for a datasource with the WildFly application server. The name started with "java:/". I was curious on what it was and how it worked. I have Apache Directory LDAP server setup locally and I'm able to connect to it with: Hashtable<String, Object> env = new Hashtable<String, Object>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env

class cast exception in narrow a jndi reffrence in ejb

孤人 提交于 2020-01-03 08:49:09
问题 I am trying to write a simple stateless sesssion bean but I have problem with narrow reference I give in lookup time. I got class cast exeption I use eclipse IDE my bean class package codes; import java.rmi.RemoteException; import javax.ejb.EJBException; import javax.ejb.SessionBean; import javax.ejb.SessionContext; public class SinaBean implements SessionBean { /** * */ private static final long serialVersionUID = 1L; public String getHello() { return "hello"; } public void ejbCreate(){ }

Enabling an Active Directory account using JNDI

北城以北 提交于 2020-01-03 04:49:11
问题 I have successfully created a disabled user in Active Directory via JNDI, but I am not sure how to enable it. Am I supposed to manipulate the userAccountControl attribute directly? Thanks. 回答1: You are right. Here are some values and the explanation how to use them : UF_TEMP_DUPLICATE_ACCOUNT 0x0100 UF_NORMAL_ACCOUNT 0x0200 UF_INTERDOMAIN_TRUST_ACCOUNT 0x0800 UF_WORKSTATION_TRUST_ACCOUNT 0x1000 UF_SERVER_TRUST_ACCOUNT 0x2000 UF_DONT_EXPIRE_PASSWD 0x10000 UF_SCRIPT 0x0001 UF_ACCOUNTDISABLE

Weblogic 10.3.5 & EJB 3 JNDI names

会有一股神秘感。 提交于 2020-01-02 19:56:16
问题 Could someone tell me where I can find infos on the default JNDI naming for EJB 3 ? Does Weblogic use portable JNDI names like Glassfish? Can I find (like for Glassfish) a trace of EJB deployment with JNDI names used? For example : an interface (Service) with only @Remote a bean (ServiceImpl) with only @Stateless implementing the interface everything packaged in an .ear file (service-application-1.0) When deploying on Weblogic the only JNDI reference I see is: service-application-1.0service

JNDI-LDAP paging

帅比萌擦擦* 提交于 2020-01-02 08:38:28
问题 I managed to get pagination working like described here. The problem is I need to expose an API which would look like this: getUsers(pageSize, pageNumber) , which does not really go well with the way JNDI/LDAP does the paging(with a cookie you pass each time to the search method). The code looks like this: private NamingEnumeration ldapPagedSearch(String filter, int pageSize, int pageNumber){ InitialLdapContext ctx = getInitialContext(); //TODO: get the id also, need to spec it in UI //

Set project stage for JavaServer Faces with JNDI configuration/lookup in Glassfish v3

六眼飞鱼酱① 提交于 2020-01-02 07:08:32
问题 I'm trying to set the project stage for JavaServer Faces in a GlassFish application server v3 with a JNDI property. I set the stage property to Development stage, but my application received always the Production stage. I use GlassFish Server Open Source Edition 3.1 (build 43) on a windows system. For rendering the project stage in the JSF page I use this: <h:outputText value="Stage:#{facesContext.application.projectStage}"/> Is anything else necessary to use the project stage in an

How to access EJB on remote server?

我与影子孤独终老i 提交于 2020-01-02 07:04:33
问题 I am using a GlassFish-3.1.2 server running in my subnet (192.168.1.3:3700). I already deployed an enterprise app including an EJB in which i defined a business method. Now I want to remotely access the EJB from my java application client. How do i have to setup the JNDI resp. the InitialContext object for doing the lookup of the EJB ? How do I need to define the properties? Btw. I had to run "asadmin enabled-secure-admin" in order to make the GlassFish server work on the LAN. Probably I also

Unable to use JNDI DataSource provided by Tomcat in Spring?

对着背影说爱祢 提交于 2020-01-02 04:16:06
问题 I want to use JNDI DataSource provided by Tomcat in Spring based application. I use Tomcat 7 pool. Tried to configure as described here. Configured server.xml of Tomcat: <GlobalNamingResources> <Resource name="jdbc/ApsuserAtAzistst" auth="Container" type="org.apache.tomcat.jdbc.pool.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@10.0.153.10:1525:AZISTST" username="APSUSER" password="PASSWORDOFAPSUSER" initialSize="1" minIdle="1" maxIdle="1" maxActive="3" maxWait

ClassCastException when casting looked-up EJB view in AS7

ぐ巨炮叔叔 提交于 2020-01-02 01:59:29
问题 I have am deploying 2 EARs onto JBoss AS 7.1.0.Alpha1-SNAPSHOT (post 7.0.1.Final version). Both deploy fine. I have an EJB Singleton class packaged within a JAR, within one of the EARs: @Startup @Singleton // one of @Local(Store.class), @Remote(Store.class), @LocalBean @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) @Transactional(TransactionPropagation.SUPPORTS) public class StoreFront implements Store { ... public interface Store { ... When it deploys, it says the EJB is bound