EzDevInfo.com

weblogic interview questions

Top weblogic frequently asked interview questions

How to work with Weblogic in Eclipse?

What are the recommended plugins for eclipse to work with weblogic? Specifically I would need to work with older version of weblogic, 8.1, however I could use any version of Ecplise. I would like to debug the application and set breakpoints etc.

My bigger task is to move the project over to Jboss, can I deploy the same app on both app servers within Eclipse with presumably 2 sets of config files etc, any advice? 2 separate projects?


Source: (StackOverflow)

Why use Unicast versus Multicast in Weblogic Clusters

It's unclear from the documentation why you should use Unicast rather than Multicast in a WebLogic cluster. Anyone have experience using either and the benefits of moving to Unicast?


Source: (StackOverflow)

Advertisements

Getting a list of all classloaders in a JVM

Is it possible to get a list of all class loaders in a JVM or at least all class loaders associated with web apps in a Java EE Server (WebLogic in my case).


Source: (StackOverflow)

Weblogic Transaction Timeout : how to set in admin console in WebLogic AS 8.1

I face the following exception:
weblogic.transaction.internal.TimedOutException: Transaction timed out after 300 seconds

this is set within the Stateless Session EJB Bean as javax.transaction.UserTransaction jtaTransaction.setTransactionTimeout(300) but I cannot figure out, where in the application console to set this property.


Source: (StackOverflow)

Troubleshooting connections stuck in CLOSE_WAIT status

I have a Java application running in WebLogic 11g on Windows, which after several days, becomes unresponsive. One suspicious symptom I've noticed is that a large number of connections (about 3000) show up in netstat with a CLOSE_WAIT status even when the server is idle. Since the application server is managing the client connections, I'm not sure what's causing this. We also make a number of web service calls that loopback to the same server, but I believe those connections get closed properly. What else could cause this and how does one troubleshoot a problem like this?


Source: (StackOverflow)

What is t3 protocol in weblogic server?

Recently I started working with weblogic and see references to t3 in urls that appear in logs. What is this t3 protocol?


Source: (StackOverflow)

Weblogic or JBoss? [closed]

I am a long time Java developer on JBoss(and Tomcat). In the last year I had to develop over WebLogic and I have to say - I really miss JBoss.

Since my experience with WebLogic is pretty shallow, I am asking the more experienced guys out there: Is there a reason for spending money on WebLogic? Isn't JBoss giving you all that you need?


Source: (StackOverflow)

Indirectly referenced from required .class file

I'm getting an error message when I try to build my project in eclipse:

The type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced from required .class files

I've looked online for a solution and cannot find one (except for those sites that make you pay for help). Anyone have any idea of a way to find out how to go about solving this problem? Any help is appreciated, thanks!


Source: (StackOverflow)

SessionTimeout: web.xml vs session.maxInactiveInterval()

I'm trying to timeout an HttpSession in Java. My container is WebLogic.

Currently, we have our session timeout set in the web.xml file, like this

<session-config>
    <session-timeout>15</session-timeout>
</session-config>

Now, I'm being told that this will terminate the session (or is it all sessions?) in the 15th minute of use, regardless their activity.

I'm wondering if this approach is the correct one, or should I programatically set the time limit of inactivity by

session.setMaxInactiveInterval(15 * 60); //15 minutes

I don't want to drop all sessions at 15 minutes, only those that have been inactive for 15 minutes.

Are these methods equivalent? Should I favour the web.xml config?


Source: (StackOverflow)

Tomcat vs Weblogic JNDI Lookup

The Weblogic servers we are using have been configured to allow JNDI datasource names like "appds".

For development (localhost), we might be running Tomcat and when declared in the <context> section of server.xml, Tomcat will hang JNDI datasources on "java:comp/env/jdbc/*" in the JNDI tree.

Problem: in Weblogic, the JNDI lookup is "appds" whilst in Tomcat, it seems that that I must provide the formal "java:comp/env/jdbc/appds". I'm afraid the Tomcat version is an implicit standard but unfortunately, I can't change Weblogic's config ... so that means we end up with two different spring config files (we're using spring 2.5) to facilitate the different environments.

Is there an elegant way to address this. Can I look JNDI names up directly in Tomcat? Can Spring take a name and look in both places? Google searches or suggestions would be great.


Source: (StackOverflow)

WebLogic stuck thread protection

By default WebLogic kills stuck threads after 15 min (600 s), this is controlled by StuckThreadMaxTime parameter. However, I cannot find more details on how exactly "stuckness" is defined. Specifically:

  • What is the point at which 15 min countdown begins. Request processing start? Last wait()-like method? Something else?
  • Does this apply only to request-processing threads or to all threads? I.e. can a request-processing thread "escape" this protection by spawning a worker thread for a long task? Especially, can it delegate response writing to such a worker without 15 min countdown?

My usecase is download of huge files through a permission system. Since a user needs to be authenticated and have permissions to view a file, I cannot (or at least don't know how) leave this to a simple HTTP server, e.g. Apache. And because files can be huge, download could (at least in theory) take more than 15 minutes.


Source: (StackOverflow)

java.lang.InternalError: name is too long to represent

I get this error:

java.lang.InternalError: name is too long to represent
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:338)
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:291)
        at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:259)

Which seems related to some debug functionality (in fact removing -Xdebug command line option the error disappears). I've also found some information in ASF Bugzilla. Is there a way to solve this?

Possible solutions I can think of are to change the JVM (using JRockit which should't have this issue), but I do not really know if this can solve the issue and if it can break something else.


Source: (StackOverflow)

Class bytes found but defineClass()failed for error when deploying EAR

I am trying to deploy and old code base with EJB 1.1 stuff to Weblogic 10.3.6 and keep getting this strange error Class bytes found but defineClass()failed for.

The classes are there and being found what is causing this?


Source: (StackOverflow)

Speed up Weblogic Server startup times

At my work, we use Weblogic Server to host an enterprise portal. Which is fine.

However, I've recently had the opportunity to use Tomcat for some side projects, and I am struck by the incredible difference in speed. Tomcat takes 3-5 seconds to start up, and 10-15 seconds to deploy a medium-sized projects. Wewblogic takes 3-5 minutes to start, and up to 10 minutes to deploy. This kills any iterative development.

Am I going to have to resign myself to its being slow and bloated, or is there anything I can do to speed it up? Anyone have experience with this?


Source: (StackOverflow)

JMS performance

I'm having a bit of trouble with understanding JMS from a performance perspective. We have this very straightforward code in our application:

QueueConnection connection = null;
QueueSession session = null;
QueueSender sender = null;
TextMessage msg = null;

try {
  // The JNDIHelper uses InitialContext to look up things
  QueueConnectionFactory qcf = JNDIHelper.lookupFactory();
  Queue destQueue = JNDIHelper.lookupQueue();

  // These objects are created for every message, which is quite slow
  connection = qcf.createQueueConnection();
  session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
  sender = session.createSender(destQueue);

  // This is the actual message
  msg = session.createTextMessage(xmlMsg);
  sender.setTimeToLive(0);
  sender.send(msg);
} 
finally {

  // Close all objects again
  JMSUtilities.safeClose(sender);
  JMSUtilities.safeClose(session);
  JMSUtilities.safeClose(connection);
}

The code is correct, but probably some of the above artefacts could be reused for several messages. These are our configurations:

  • We use Oracle Weblogic 10.3.3
  • Weblogic connects to IBM MQ 7.0 (Problem also appears with 6.0) for JMS
  • The above logic is executed by a single thread on a backend server. It would be simple to keep some objects (QueueConnection, QueueSession, QueueSender) in memory as there is no concurrency involved.

My questions

  • Which types of objects can be shared among several messages? (of course we'd include error recovery, restoring those shared objects)
  • What are best practices to improve performance?

Source: (StackOverflow)