Search Results

Search found 700 results on 28 pages for 'j2ee'.

Page 9/28 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Weblogic 10.3.0 : Loosing a stateless session bean in the bean pool

    - by KlasE
    Hi, We have a strange situation where we loose a Stateless SessionBean in a Bean Pool in Weblogic 10.3.0 Since we only have one bean in the pool, this effectively hangs all incoming calls. We do not want more than one instance in the pool because of application restrictions. In the Weblogic admin console, we can see that there are 1 instance in the bean pool, 0 beans in use and 1 waiting incoming request. The question is, what can have caused the system to not send the request to the one obviously free bean instance? This happens after several hours and over 100000 incoming requests, and the same scenario worked fine in the old weblogic 8 environment. We get the following stacktrace: "[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'" waiting for lock java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@b0d484 TIMED_WAITING sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2054) weblogic.ejb.container.pool.StatelessSessionPool.waitForBean(StatelessSessionPool.java:269) weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:111) weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:148) weblogic.ejb.container.internal.BaseRemoteObject.preInvoke(BaseRemoteObject.java:227) weblogic.ejb.container.internal.StatelessRemoteObject.preInvoke(StatelessRemoteObject.java:52) com.mycompany.beans.MessageLogFacace_n73y0z_EOImpl.isMyStuffValid(MessageLogFacace_n73y0z_EOImpl.java:261) com.mycompany.beans.MessageLogFacace_n73y0z_EOImpl_WLSkel.invoke(Unknown Source) weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589) weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230) weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) weblogic.security.service.SecurityManager.runAs(Unknown Source) weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473) weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118) weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Any help would be very welcome. Regards Klas

    Read the article

  • java - useBean in jsp and getAttribute in jsp but NULL

    - by ravi parekh
    user is null in servlet. Pls let me if doing mistake. i m trying to get all html element in bean rateCode.jsp **<%@page import="com.hermes.data.RateCode_" %>** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Rate Code</title> </head> <body> **<jsp:useBean id="user" class="com.hermes.data.RateCode_" scope="session" > <jsp:setProperty name="user" property="*"/></jsp:useBean>** <form id="f_rateCode" action="/ratePromoCodes" method="post" > <table align="center" border="1" cellspacing="0"> <tr> <td colspan="2" align="center" class="header">Rate Code Administrations</td> </tr> <tr> <td align="right" style="border-style: solid;">Rate Code:</td> <td align="left" style="border-style: solid;"> <input type="text" id="code" name="code" value="${user.code}" size="10" maxlength="32" style="width: 100px"/> </td> </tr> <tr> <td align="right" style="border-style: solid;">Rate Description:</td> <td align="left" style="border-style: solid;"> <input type="text" id="description" name="description" value="<%=user.getDescription()%>" maxlength="128" size="40"></td> </tr> <tr><td><input type="submit" value="ok" /></td> </tr> </table> </form> Servlet - ratePromoCodes protected void doPost(HttpServletRequest req, HttpServletResponse resp) { RateCode rc = (RateCode) req.getAttribute("user"); Enumeration an = req.getAttributeNames(); Enumeration pn = req.getParameterNames(); Object o = null; while (an.hasMoreElements()) { o = an.nextElement(); System.out.println(o); } while (pn.hasMoreElements()) { o = pn.nextElement(); System.out.println(o); } } RateCode.java (javaBean) public class RateCode_ { private String code ; private String description; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }

    Read the article

  • How to declare a Generics Action in struts2.xml file ?

    - by Rasatavohary
    Hi everyone, My problems is in a Struts2 action, where I have a class : public class MyAction<T> extends ActionSupport with a private member like this : private T myData; And I would like to declare this aciton in the struts.xml file, how can i manage to do so ? Thanks for the answer. Ps : I've tried without declaration of T, but it did not work

    Read the article

  • how to implement more functionality in webpage

    - by trans
    Dear All, I have a website in front page i m displaying 5 records ,for different options,i want that when user licks more he should be able to view next records.i would i keep track as whicg list has already been shown to user,since i m using an arraylist,can i ipmlement it through that.

    Read the article

  • It is possible to call a servlet from a Java class?

    - by Renan Mozone
    I'm using IBM WebSphere as my servlet container. My application has several servlets and Java classes. My intent is to call one of those servlets directly from a Java class. Doing some research I figured out that is possible to use the RequestDispatcher interface to achieve this. But it is necessary to pass the objects ServletRequest and ServletResponse as arguments to the method forward(). There is some way to bypass this safely and "nicely"? By "nicely" I meant to say preserving good programming and design patterns.

    Read the article

  • Spring Web Service Client Tutorial or Example Required

    - by Nirmal
    Hello All... I need to jump into the Spring Web Service Project, in that I required to implement the Spring Web Service's Client Only.. So, I have already gone through with Spring's Client Reference Document. So, I got the idea of required classes for the implementation of Client. But my problem is like I have done some googling, but didn't get any proper example of both Client and Server from that I can implement one sample for my client. So, if anybody gives me some link or tutorial for proper example from that I can learn my client side implementation would be greatly appreciated. Thanks in advance...

    Read the article

  • testing dao with hibernate genericdao pattern with spring.Headache

    - by black sensei
    Hello good fellas! in my journey of learning hibernate i came across an article on hibernate site. i' learning spring too and wanted to do certain things to discover the flexibility of spring by letting you implement you own session.yes i don't want to use the hibernateTemplate(for experiment). and i'm now having a problem and even the test class.I followed the article on the hibernate site especially the section an "implementation with hibernate" so we have the generic dao interface : public interface GenericDAO<T, ID extends Serializable> { T findById(ID id, boolean lock); List<T> findAll(); List<T> findByExample(T exampleInstance); T makePersistent(T entity); void makeTransient(T entity); } it's implementation in an abstract class that is the same as the one on the web site.Please refer to it from the link i provide.i'll like to save this post to be too long now come my dao's messagedao interface package com.project.core.dao; import com.project.core.model.MessageDetails; import java.util.List; public interface MessageDAO extends GenericDAO<MessageDetails, Long>{ //Message class is on of my pojo public List<Message> GetAllByStatus(String status); } its implementation is messagedaoimpl: public class MessageDAOImpl extends GenericDAOImpl <Message, Long> implements MessageDAO { // mySContainer is an interface which my HibernateUtils implement mySContainer sessionManager; /** * */ public MessageDAOImpl(){} /** * * @param sessionManager */ public MessageDAOImpl(HibernateUtils sessionManager){ this.sessionManager = sessionManager; } //........ plus other methods } here is my HibernatUtils public class HibernateUtils implements SessionContainer { private final SessionFactory sessionFactory; private Session session; public HibernateUtils() { this.sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); } public HibernateUtils(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } /** * * this is the function that return a session.So i'm free to implements any type of session in here. */ public Session requestSession() { // if (session != null || session.isOpen()) { // return session; // } else { session = sessionFactory.openSession(); // } return session; } } So in my understanding while using spring(will provide the conf), i'ld wire sessionFactory to my HiberbernateUtils and then wire its method RequestSession to the Session Property of the GenericDAOImpl (the one from the link provided). here is my spring config core.xml <bean id="sessionManager" class="com.project.core.dao.hibernate.HibernateUtils"> <constructor-arg ref="sessionFactory" /> </bean> <bean id="messageDao" class="com.project.core.dao.hibernate.MessageDAOImpl"> <constructor-arg ref="sessionManager"/> </bean> <bean id="genericDAOimpl" class="com.project.core.dao.GenericDAO"> <property name="session" ref="mySession"/> </bean> <bean id="mySession" factory-bean="com.project.core.dao.SessionContainer" factory-method="requestSession"/> now my test is this public class MessageDetailsDAOImplTest extends AbstractDependencyInjectionSpringContextTests{ HibernateUtils sessionManager = (HibernateUtils) applicationContext.getBean("sessionManager"); MessageDAO messagedao =(MessageDAO) applicationContext.getBean("messageDao"); static Message[] message = new Message[] { new Message("text",1,"test for dummies 1","1234567890","Pending",new Date()), new Message("text",2,"test for dummies 2","334455669990","Delivered",new Date()) }; public MessageDAOImplTest() { } @Override protected String[] getConfigLocations(){ return new String[]{"file:src/main/resources/core.xml"}; } @Test public void testMakePersistent() { System.out.println("MakePersistent"); messagedao.makePersistent(message[0]); Session session = sessionManager.RequestSession(); session.beginTransaction(); MessageDetails fromdb = ( Message) session.load(Message.class, message[0].getMessageId()); assertEquals(fromdb.getMessageId(), message[0].getMessageId()); assertEquals(fromdb.getDateSent(),message.getDateSent()); assertEquals(fromdb.getGlobalStatus(),message.getGlobalStatus()); assertEquals(fromdb.getNumberOfPages(),message.getNumberOfPages()); } i'm having this error exception in constructor testMakePersistent(java.lang.NullPointerException at com.project.core.dao.hibernate.MessageDAOImplTest) with this stack : at com.project.core.dao.hibernate.MessageDAOImplTest.(MessageDAOImplTest.java:28) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at junit.framework.TestSuite.createTest(TestSuite.java:61) at junit.framework.TestSuite.addTestMethod(TestSuite.java:283) at junit.framework.TestSuite.(TestSuite.java:146) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:481) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888) )) How to actually make this one work.I know this is a lot to stuffs and i'm thanking you for reading it.Please give me a solution.How would you do this? thanks

    Read the article

  • Ways to polling server status

    - by Yijinsei
    Hi guys, I am try to create a JSP page that will show all the status in a group of local servers. Currently I create a schedule class that will constantly poll to check the status of the server with 30 second interval, with 5 second delay to wait for each server reply, and provide the JSP page with the information. However I find this way to be not accurate as it will take some time before the information of the schedule class to be updated. Do you guys have a better way to check the status of several server within a local network?

    Read the article

  • Java wiki engine

    - by Mite Mitreski
    There are plenty of java wiki engines http://java-source.net/open-source/wiki-engines I'm currently looking for good lightweight wiki , something like the community wiki on stackoverflow , that can be easily integrated into excising applications. Please write about something that you have used.

    Read the article

  • Memory Profiling: How to detect which application/package is consuming too much memory

    - by malvim
    Hi, I have a situation here at work where we run a JEE server with several applications deployed on it. Lately, we've been having frequent OutOfMemoryException's. We suspect some of the apps might be behaving badly, maybe leaking, or something. The problem is, we can't really tell which one. We have run some memory profilers (like YourKit), and they're pretty good at telling what classes use the most memory. But they don't show relationships between classes, so that leaves us with a situation like this: We see that there are, say, lots of Strings and int arrays and HashMap entries, but we can't really tell which application or package they come from. Is there a way of knowing where these objects come from, so we can try to pinpoint the packages (or apps) that are allocating the most memory? Thank you in advance.

    Read the article

  • Space-based architecture?

    - by rcampbell
    One chapter in Pragmatic Programmer recommends looking at a blackboard/space-based architecture + a rules engine as a more flexible alternative to a traditional workflow system. The project I'm working on currently uses a workflow engine, but I'd like to evaluate alternatives. I really feel like a SBA would be a better solution to our business problems, but I'm worried about a total lack of community support/user base/venders/options. JavaSpaces is dead, and the JINI spin-off Apache River seems to be on life support. SemiSpace looks perfect, but it's a one-man show. The only viable solution seems to be GigaSpaces. I'd like to hear your thoughts on space based architecture and any experiences you've had with real world implementations.

    Read the article

  • Websites using JEE

    - by Rob
    Hi guys, I have a simple question, but I can't find out the answer. I'm wondering if we can see that a website is built using the JEE technology, or servlets/JSP. I think it could be possible to look for specials pages from the server (404, wrong parameters, ...) in some cases, but what about the everyday use ? In fact, I look for a collection of great (or wide used) website using the java technology, and I can't really find a list of these. I'llbe very happy if you can help me with these two small questions

    Read the article

  • Is it normal that conversationId keeps increasing after each page request?

    - by Casper
    Hi I'm building a Seam application and have a question: I got a stateless session bean (default seam scope) with a delete and a select method. A page which contains a datamodel loads and got links to select and delete each row (both links refer to the actionmethods in the bean). The delete method deletes the selected row from the list and returns null (reloads page). The select method loads a new page where the selected row can be edited. Each time a link in the datamodel is clicked and an action gets fired, the conversationId gets increased. Is this normal behaviour since im not even in a conversation? If it ain't normal behaviour, what's best practice to prevent this from happening?

    Read the article

  • Adding an HTTP Header to the request in a servlet filter

    - by Mason
    I'm integrating with an existing servlet that pulls some properties out of the HTTP header. Basically, I'm implementing an interface that doesn't have access to the actual request, it just has access to a map of k-v for the HTTP headers. I need to pass in a request parameter. The plan is to use a servlet filter to go from parameter to header value but of course the HttpServletRequest object doesn't have an addHeader() method. Any ideas?

    Read the article

  • Problems with deploying struts annotations in ear file

    - by Asif
    I am attempting to make use of the struts 2 annotations, what I have found is if I deploy the app as a war file everything works fine but if I deploy my war as part of an ear file none of the struts annotations work only the actions defined in struts.xml work. I can't seem to work out why deploying as a ear file annotations don't work. Has anyone else experienced this problem? I am using struts 2.1.8 and deploying to Jboss 5 thanks

    Read the article

  • Handling connection errors in a MDB

    - by Rafa de Castro
    Is it possible to manage connection timeouts or errors in a MessageDrivenBean? You can make the factory to retry connecting a certain number of times but... is it possible to make some actions each time that a reconnection retrial is neccesary? Is it possible to register an ExceptionListener into the MessageDrivenBean's connection somehow? Thanks a lot.

    Read the article

  • Servlet requests are executed sequentially for no apparent reason in Glassfish v3

    - by Fabien Benoit
    Hi, I'm using Glassfish 3 Web profile and can't get http workers to execute concurrently requests on a servlet. This is how i observed the problem. I've made a very simple servlet, that writes the current thread name to the standard output and sleep for 10 seconds : protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println(Thread.currentThread().getName()); try { Thread.sleep(10000); // 10 sec } catch (InterruptedException ex) {} } } And when i'm running several simultaneous requests, I clearly see in the logs that the requests are sequentially executed (one trace every 10 seconds). INFO: http-thread-pool-8080-(2) (10 seconds later...) INFO: http-thread-pool-8080-(1) (10 seconds later...) INFO: http-thread-pool-8080-(2) etc. All my GF settings are untouched - it's the out-of-the-box config (the default thread pool is 2 threads min, 5 max if I recall properly). ...I really don't understand why the sleep() block all the others worker threads. Any insight would be greatly appreciated ! Thanks, Fabien

    Read the article

  • jax-ws, authentication for php clents

    - by kislo_metal
    Scenario: Server is glassfish with jax-ws web services and clients is php based What type of authentication for web services is more computable with php based clients ? HTTP Basic Authentication HTTPS Client Authentication Mutual Authentication (is it supported ?) Digest Authentication (is it supported ?) Description : Specifying an Authentication Mechanism Thank you!

    Read the article

  • Problems with retrieving the correct cookie in Java

    - by Spines
    When I retrieve the cookies in my java servlet, all of the values from getPath() are null. So if a cookie with the same name is set in directory /foo, and at the root directory, I retrieve two cookies with the same exact name, but I can't differentiate them because getPath() returns null for both. I looked in firebug and saw that firefox was not sending anythign for the path. My application uses a "rememberme" cookie with the path set to "/". Everything works fine as long as there is only one cookie with name rememberme. But if somehow another cookie gets set with the same name on a different path like /foo, then my application won't know which one is the one I set for the root. How can I differentiate the cookies? Do I need to worry about a cookie existing with the same name in a subdir, or can I just assume there will be only the one I set?

    Read the article

  • Java: Is clone() really ever used? What about defensive copying in getters/setters?

    - by GreenieMeanie
    Do people practically ever use defensive getters/setters? To me, 99% of the time you intend for the object you set in another object to be a copy of the same object reference, and you intend for changes you make to it to also be made in the object it was set in. If you setDate(Date dt) and modify dt later, who cares? Unless I want some basic immutable data bean that just has primitives and maybe something simple like a Date, I never use it. As far as clone, there are issues as to how deep or shallow the copy is, so it seems kind of "dangerous" to know what is going to come out when you clone an Object. I think I have only used clone() once or twice, and that was to copy the current state of the object because another thread (ie another HTTP request accessing the same object in Session) could be modifying it. Edit - A comment I made below is more the question: But then again, you DID change the Date, so it's kind of your own fault, hence whole discussion of term "defensive". If it is all application code under your own control among a small to medium group of developers, will just documenting your classes suffice as an alternative to making object copies? Or is this not necessary, since you should always assume something ISN'T copied when calling a setter/getter?

    Read the article

  • How to set MQMD ApplicationID field via JMS API?

    - by Alon
    Hello, I'm using the JMS API to send messages to a Websphere MQ server. The application that pulls the messages i create want's me to set up the ApplicationID field in the MQMD structure to constant value. I could not find a way in the JMS API to access the MQMD structure The question: Is there a way doing this? if yes then how? If no, then is my only option is to use the MQ java API, instead of JMS API? Thanks

    Read the article

  • Can Java Code tell if it is in an App Server?

    - by Grasper
    Is there something I can call from a POJO to see if the code is currently in an App Server or outside of an App Server? Something like this (In rough PseudoCode): System.getRunningEnvironment().equals(Environment.Glassfish) or System.getRunningEnvironment().equals(Environment.ApplicationServer) or System.getRunningEnvironment().equals(Environment.JavaSE)

    Read the article

  • Website using JEE

    - by Rob
    Hi guys, I have a simple question, but I can't find out the answer. I'm wondering if we can see that a website is built using the JEE technology, or servlets/JSP. I think it could be possible to look for specials pages from the server (404, wrong parameters, ...) in some cases, but what about the everyday use ? In fact, I look for a collection of great (or wide used) website using the java technology, and I can't really find a list of these. I'llbe very happy if you can help me with these two small questions

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >