Questions tagged [initial-context]

74 questions
3
votes
1 answer

Closing remote EJB connection during managed transaction

I have a following situation: Client is calling Stateless local EJB - managed transaction begins with this invocation Local EJB builds InitialContext and looks up remote EJB Local EJB invokes method on remote EJB Local EJB closes context and…
3
votes
1 answer

Tomcat 7 accessing EJB on glassfish 3

I've seen very many post, and i googled a lot but i'm not able to get out of this problem. I have an EJB module deployed on a glassfish v 3.1.2, and i want to access it by a tomcat v 7. There seems to be no problem when the servers runs on the same…
LMG
  • 966
  • 1
  • 12
  • 28
3
votes
3 answers

Invoking EJB 3 deployed on GlassFish 3.1 from Servlet on JBoss AS 7.1.1

I have a simple session EJB (3.0 spec) deployed on GlassFish 3.1 with a remote interface. Here is the log snippet showing deployment: INFO: Portable JNDI names for EJB RandomNumber2Bean : [java:global/RandomNumberEJB/RandomNumber2Bean,…
user1709829
  • 101
  • 1
  • 5
3
votes
3 answers

How to setup JNDI for Glassfish 3.1.2 for a stand-alone client?

I try to connect from a stand-alone swing client (running in a separate JVM on the client machine) to the Glassfish server. I currently use the following settings from Netbeans and everything works just…
salocinx
  • 3,715
  • 8
  • 61
  • 110
2
votes
1 answer

Should we always close javax.naming.InitialContext at client side of JBoss app?

When we create a new InitialContext for remote access to Enterprise Java Beans, after work is done, should we always close the context via context.close() ? Here is a code sample: // Client side method private void doSomeActionMethod() { …
PeterB
  • 2,234
  • 6
  • 24
  • 43
2
votes
1 answer

NotSerializableException with BasicDataSource in JNDI

I am setting up a standalone JNDI and loading a Datasource to the JNDI. DataSource I use is: org.apache.commons.dbcp.BasicDataSource The JNDI is set up as follows String detectorHost = InetAddress.getLocalHost().getHostName(); …
2
votes
0 answers

JNDI in OSGI with Apache Aries

I am new at OSGi and JNDI. I am trying to do a JMS client in a bundle using HornetQ. To do so, I use JNDI. As far as I know, I need to use Apache Aries to do so. I get the JNDIContextManager thanks to iPOJO, and that seems to work well. there must…
excalibur1491
  • 1,201
  • 2
  • 14
  • 29
1
vote
1 answer

Java + Hibernate4 + GWT + App Engine = InitialContext error

I try to develop a simple webapp using GWT + hibernate4 + Apache Tomcat. Now I have written my simple classes with GWT & hibernate (using the default App Engine server for the first time), but I get an error while sending data to server, whch…
Alex A. Renoire
  • 361
  • 1
  • 2
  • 19
1
vote
0 answers

Invalid EJB using interfaces from external Jar in @local - Annotation

as application server I use GlassFish to create my new Java EE 6 application. I have two projects in my workspace, resp. on one sever. The first is a pure EJB Project including some EJBs with local and remote accessibility. (I am using @remote and…
1
vote
1 answer

Move to Glassfish-2.x clustered causes connections to timeout after 1hr

We recently moved from Glassfish-2.x not clustered to a Glassfish-2.x clustered environment. Part of the move included using RMI over IIOP instead of connecting to a static server. Everything works great except when our client application sits idle…
Kecher
  • 21
  • 3
1
vote
0 answers

LDAP - InitialDirContext creation - timeout not working

I have a code implementation that uses LDAP functionality. Inorder to get values I am initially generating a InitialDirContext. I have set a timeout value of 2 seconds for establishing connection. But I can see that the thread waits for around 20…
Nit
  • 23
  • 6
1
vote
1 answer

Making a static datasource

I have done enough research on this topic, but yet to find a concrete answer for this. Following is the code snippet, private static Map dataSourceMap; static { Map jndiContextDataSourceMap = new…
Mohamed Anees A
  • 4,119
  • 1
  • 22
  • 35
1
vote
1 answer

Access Remote EJB in one Websphere profile from another WebSphere profile

In short: I make a remote JNDI call for a stateless bean from one Websphere server to another (different profiles in different JVMs on the same machine) but after the call is done, the InitialContext gets changed and I can no longer access my local…
Diana S
  • 31
  • 6
1
vote
0 answers

NoInitialContextException when deploying MDB on custom resource adapter

I developed a resource adapter that I would like to use within my application ear, deployed in JBoss 5.1. After playing around with annotations and xml files, I came up with the following setup. ejb-jar.xml
LeChe
  • 1,288
  • 14
  • 18
1
vote
1 answer

Context Initialization error while migarting our code to the Liberty profile

We are migrating our code from WAS 8.0 to Liberty 17.0.0.1 version. While we try to test the application online functionality we are getting the below error, java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory…
Venkatesh
  • 31
  • 1
  • 7