Search Results

Search found 2458 results on 99 pages for 'rafael spring'.

Page 94/99 | < Previous Page | 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • Grails or Play! for an ex-RoR developer ?

    - by Kedare
    Hello, I plan to begin learning a Java web framework (I love the Java API), I already used Rails and Django. I want something close to Java, but without all the complexity of J2EE. I've found 2 framework that could be good for me : Grails : Grails looks great, it use Groovy that is better than Java for web application (I think..), but it's slower, that use pure-java components (Hibernate, Strut, Spring), it looks pretty simple to deploy (send .war and it's ok !), the GSP is great ! It's a bit harder to debug (need to restart the server at each modification, and the stacktrace is a mix of Java and Groovy stack that is not always understandable..) Play! : This framework also looks great, it's faster than Grails (It's use directly Java), but I don't really like how it use Java, it modify the source code to transform the properties call as setXXX/getXXX, I'm not kind of that... The framework also have caching function that Grails don't (alreary) has. I don't really like the Template Engine. It's also easer to debug (no need to restart the server, and the stacktrace is clear) What do you recommend for ? I am looking for something easy to learn (I used a lot ruby and java, but a little bit java (But I love the Java API)), that is full featured (That's no a problem with all the Java Library availables, but if it's bundle and integrated I prefer), that scale and that is not too slow (faster than ruby), and if possible I would want something with a decent community to easily find support and answer to my questions ;) PS: No JRuby on Rails Thank you !

    Read the article

  • Modify Jquery UI slider control

    - by Jean-Yves Deman
    I use the Jquery UI slider control. My slider has a width of 200px. I would like the center of my left handle is shifted 14px to the right and the center of my right handle is offset to the left of 14px. So, my good slider will more than 172px (200-14-14). The background-image measure good 200px. The length of 14px is calculated as follows: width of the handle (28px) / 2. Can you help me solve this mystery? Thank you in advance. .ui-slider .ui-slider-handle { width:28px; height:28px; background:url(images/bulle.png) no-repeat 0 0; overflow: hidden; position:absolute; margin-left:0px; top: -7px; border-style:none; cursor:help; }? I use "margin-left:0px;" to delete the "margin-left:-14px" by default. But, my right handle spring 28px to the right ! Help me please !

    Read the article

  • Database frontend for multiple db engines

    - by xeroxed_yeti
    Hey Stackoverflow, yeah it's spring and a lot of things happens to me... Also changing some software things at my computer, because suddenly everything seems to be boring after starting my laptop. I even changed my wallpaper!!! Besides I'm looking for a new database frontend and after using google with serveral queries I didn't find the right software. You have to know, my laptop and me are very very special :) I'm looking for a database frontend which should have following features can access PostgreSQL and MySQL databases can handle schemata overs a nice sql query tool supports an import and export functionality (something like tab separated text files) it for free looks awesome - every time when a college come to my office he must get the feeling: oh boy, this man really knows his job and should get more money! At the moment I used phpmyadmin, phppgadmin, pgadminIII, mysqladmin and dbVisualizer. Furthermore I was a big fan of the aqua datastudio until it became commercial. This tools offers a great variety of functionalities which can simplify programmes live. However, now you have to buy a license...I'm a scientist and money for software is limited =) So it's my first time (question) here at stackoverflow please be cheerful :)

    Read the article

  • Play framework does not return page and static content

    - by Anton
    I'm using play framework in production for one of my web projects. From time to time Play does not render main page or does not return some of the static content files. I have attached few screenshots below. First screenshot displays firebug console, loading of the site is stucked at the beginning, when serving home page. Second screenshot display fiddler console, when 2 static resources are not loading. This issue is hard to reproduce, it happens 1 of 15 time, I have to delete cache data and reload page. (pressing CRTL-F5 in FF). Issue can be reproduced in most of the browsers. Initially, I was thinging that there is something wrong with hosting provider. But I have changed hosting provided and issue has not gone. Version of the play is 1.2.2. Play is running as standalone server. Not sure, but probably deploying Play to Jetty/Tomcat/Resin would help. Also I'm thinging about rewriting application to another stack (well-known for me - j2ee, spring, whatever) I have no idea how to debug and resolve this issue. Any clue ? Has anyone faced same issue with Play before ?

    Read the article

  • Visual Studio identical token highlighting

    - by dsteinweg
    I coded a Mancala game in Java for a college class this past spring, and I used the Eclipse IDE to write it. One of the great (and fairly simple) visual aids in Eclipse is if you select a particular token, say a declared variable, then the IDE will automatically highlight all other references to that token on your screen. Notepad++, my preferred Notepad replacement, also does this. Another neat and similar feature in Eclipse was the vertical "error bar" to the right of your code (not sure what to call it). It display little red boxes for all of the syntax errors in your document, yellow boxes for warnings like "variable declared but not used", and if you select a word, boxes appear in the bar for each occurance of the word in the document. A screenshot of these features in action: After a half hour of searching, I've determined that Visual Studio cannot do this on its own, so my question is: does anyone know of any add-ins for 2005 or 2008 that can provide either one of the aforementioned features? Being able to highlight the current line your cursor is on would be nice too. I believe the add-in ReSharper can do this, but I'd prefer to use a free add-in rather than purchase one.

    Read the article

  • What's the best way to learn .NET?

    - by duffymo
    I've been developing Java EE for quite a while now. I've used WebLogic, Tomcat, Spring, and Hibernate extensively, so I have a mental model of what features are available and how things are developed and deployed. The problem that I have with .NET is that I don't have a clear mapping of its features onto Java EE. Here's what I know so far: Java EE - .NET Java - C# JAR - DLL WAR - ? (deployment in general) EAR - ? (deployment in general) Tomcat - IIS web server JSP - ASP? JDBC - ODBC JMS - MSMQ JTA - Microsoft Transaction Manager So much of the functionality that WebLogic handles appears to be dispersed throughout the Windows OS. My confusion kicks in when I see the waves of books at Borders - VB.NET, ASP.NET, C#, etc. If I'm not a VB programmer, would it be possible to stick with C# and write enterprise apps that are the equivalent of what I'm used to with Java EE? If there were a Top Three list of books to learn from, what would they be? The "Head First" series has certainly been successful for Java. http://www.amazon.com/Head-First-C-Brain-Friendly-Guides/dp/0596514824/ref=sr_1_1?ie=UTF8&s=books&qid=1224121193&sr=8-1 Equally well recommended for .NET learning? Thanks. - %

    Read the article

  • When to call Dispose in Entity Framework?

    - by Abdel Olakara
    Hi All, In my application I am making use of Spring.Net for IoC. The service objects are called from the ASP.Net files to perform CRUD operations using these service object. For example, I have CustomerService to do all CRUD operations on Customer table. I use entity framework and the entities are injected .. my question is where do I call the dispose method? As far as I understood from the API documentations, unless I call Dispose() there is no guaranty it will be garbage collected! So where and how do I do it? Example Service Class: public class CustomerService { public ecommEntities entities = {get; set;} public bool AddCustomer(Customer customer) { try { entities.AddToCustomer(customer); entities.SaveChanges(); return true; } catch (Exception e) { log.Error("Error occured during creation of new customer: " + e.Message + e.StackTrace); return false; } } public bool UpdateCustomer(Customer customer) { entities.SaveChanges(); return true; } public bool DeleteCustomer(Customer customer) . . . And I just create an object of CustomerService at the ASP partial class and call the necessary methods. Thanks in advance for the best practice and ideas.. Regards, Abdel Raoof

    Read the article

  • Please recommend a CMS framework in Java good for making a monitoring system

    - by TiansHUo
    I already have Java code to display and process data from a database. I would now like to implement the code as modules, and incorporate as a whole into a CMS system. The CMS MUST support Spring, Hibernate, etc. The CMS MUST not be GPL, and preferably open source (lGPL, BSD,etc). The CMS MUST have good documentation and support The CMS MUST be secure (safe from XSS and injection) and support different levels of authorizations, (built-in or module) The CMS MUST have good navigation and tab, (built-in or module) +1, for having a good ajax paginated table module to display data +1, for using ajax to change pages with support for bookmarks and history.back() +1, for using jquery or prototype +1, for being easy to deploy, and easy to add modules +1, for supporting dynamically add/remove and drag-dropping of modules Please recommend a CMS best for the job. Thank you! EDIT: I don't need blogs or wikis or etc. I just want a framework where I can display paginated lists and time series graphs and log files. I will also host some pages for configuration. All of these code are already implemented.

    Read the article

  • Help for Platform plus Plugin development by J2ee

    - by echo
    Hi, everybody. I want to develop a monitor platform which can monitor many different subjects such as database, OS, middle ware etc. The system includes two parts: 1. Report center(Show some useful chart and report) 2. Collector(Collect information from monitored subject) For the time being, I just want to monitor some parameters of oracle and Linux. And I will add more monitor subject like MS SqlServer, IBM Db2 ect. later. I need a good architecture so I can easily add new monitor module and not to disturb original framework too much. I want to develop it by the method of “Platform + plugin”. A plugin should have its own UI, setting part and something else. I plan to use struts2 + spring + hibernate to develop report center. I am not very sure how to do design this architecture for I have any “Platform + plugin” experience. I ever googled some information such as OSGI and Portlet. I am not sure which one should be my best choice. Can anyone give me some instruction about it. Your help will be appreciated.

    Read the article

  • In Java it seems Public constructors are always a bad coding practice

    - by Adam Gent
    This maybe a controversial question and may not be suited for this forum (so I will not be insulted if you choose to close this question). It seems given the current capabilities of Java there is no reason to make constructors public ... ever. Friendly, private, protected are OK but public no. It seems that its almost always a better idea to provide a public static method for creating objects. Every Java Bean serialization technology (JAXB, Jackson, Spring etc...) can call a protected or private no-arg constructor. My questions are: I have never seen this practice decreed or written down anywhere? Maybe Bloch mentions it but I don't own is book. Is there a use case other than perhaps not being super DRY that I missed? EDIT: I explain why static methods are better. .1. For one you get better type inference. For example See Guava's http://code.google.com/p/guava-libraries/wiki/CollectionUtilitiesExplained .2. As a designer of the class you can later change what is returned with a static method. .3. Dealing with constructor inheritance is painful especially if you have to pre-calculate something.

    Read the article

  • Filter large amounts of data in a table w/ jQuery

    - by Bry4n
    I work for a transit agency and I have large amounts of data (mostly times), and I need a way to filter the data using two textboxes (To and From). I found jQuery quick search, but it seems to only work with one textbox. If anyone has any ideas via jQuery or some other client side library, that would be fantastic. Ideal example: To: [Textbox] From:[Textbox] <table> <tr> <td>69th street</td><td>5:00pm</td><td>5:06pm</td><td>5:10pm</td><td>5:20pm</td> </tr> <tr> <td>Millbourne</td><td>5:09pm</td><td>5:15pm</td><td>5:20pm</td><td>5:25pm</td> </tr> <tr> <td>Spring Garden</td><td>6:00pm</td><td>6:15pm</td><td>6:20pm</td><td>6:25pm</td> </tr> </table> So If I start typing in one of the stations in the To: textbox it either displays dynamically like the quick search or i have to press a button (either or) and then in the from: textbox. Lastly it shows me to: station and all its times on the left and the from: station and all its times on the right.

    Read the article

  • Array of templated structs

    - by Jakub Mertlik
    I have structs templated by int derived from a Base struct. struct Base { int i; double d; }; template< int N > struct Derv : base { static const int mN = N; }; I need to make an array of Derv< N where N can vary for each struct in that array. I know C/C++ does not allow arrays of objects of different types, but is there a way around this? I was thinking of separating the type information somehow (hints like pointers to Base struct or usage of union spring to my mind, but with all of these I don't know how to store the type information of each array element for usage DURING COMPILE TIME). As you can see, the memory pattern of each Derv< N is the same. I need to access the type of each array element for template specialization later in my code. The general aim of this all is to have a compile-time dispatch mechanism without the need to do a runtime "type switch" somewhere in the code. Thank you.

    Read the article

  • How to create an instance of object with RTTI in Delphi 2010?

    - by Paul
    As we all known, when we call a constructor of a class like this: instance := TSomeClass.Create; The Delphi compiler actually do the following things: Call the static NewInstance method to allocate memory and initialize the memory layout. Call the constructor method to perform the initialization of the class Call the AfterConstruction method It's simple and easy to understand. but I'm not very sure how the compiler handle exceptions in the second and the third step. It seems there are no explicit way to create an instance using a RTTI constructor method in D2010. so I wrote a simple function in the Spring Framework for Delphi to reproduce the process of the creation. class function TActivator.CreateInstance(instanceType: TRttiInstanceType; constructorMethod: TRttiMethod; const arguments: array of TValue): TObject; var classType: TClass; begin TArgument.CheckNotNull(instanceType, 'instanceType'); TArgument.CheckNotNull(constructorMethod, 'constructorMethod'); classType := instanceType.MetaclassType; Result := classType.NewInstance; try constructorMethod.Invoke(Result, arguments); except on Exception do begin if Result is TInterfacedObject then begin Dec(TInterfacedObjectHack(Result).FRefCount); end; Result.Free; raise; end; end; try Result.AfterConstruction; except on Exception do begin Result.Free; raise; end; end; end; I feel it maybe not 100% right. so please show me the way. Thanks!

    Read the article

  • Creating a Pop animation similar to the presentation of UIAlertView

    - by JK
    I would like to present a view in the same manner as that of UIAlertView - a pop/spring. Unfortunately subclassing UIAlertView is not an option for the view I need to present. I have written some code, but I can't seem to get it as realistic as I would like. I would appreciate any suggestions for greater realism or a link if anything similar has been done (I could not find anything on Google). Thank you. - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { self.backgroundColor = [UIColor whiteColor]; v = [[UIView alloc] initWithFrame:CGRectMake(140, 140, 60, 60)]; v.backgroundColor = [UIColor blueColor]; [self addSubview:v]; [self animate]; } return self; } - (void)animate { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:0.2]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(popStep1Complete)]; v.frame = CGRectMake(90, 90, 140, 140); [UIView commitAnimations]; } - (void)popStep1Complete { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:0.15]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(popStep2Complete)]; v.frame = CGRectMake(110, 110, 100, 100); [UIView commitAnimations]; } - (void)popStep2Complete { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:0.15]; v.frame = CGRectMake(100, 100, 120, 120); [UIView commitAnimations]; }

    Read the article

  • Filter large amounts of data from a HTML table w/ jQuery

    - by Bry4n
    I work for a transit agency and I have large amounts of data (mostly times), and I need a way to filter the data using two textboxes (To and From). I found jQuery quick search, but it seems to only work with one textbox. If anyone has any ideas via jQuery or some other client side library, that would be fantastic. Ideal example: To: [Textbox] From:[Textbox] <table> <tr> <td>69th street</td><td>5:00pm</td><td>5:06pm</td><td>5:10pm</td><td>5:20pm</td> </tr> <tr> <td>Millbourne</td><td>5:09pm</td><td>5:15pm</td><td>5:20pm</td><td>5:25pm</td> </tr> <tr> <td>Spring Garden</td><td>6:00pm</td><td>6:15pm</td><td>6:20pm</td><td>6:25pm</td> </tr> </table> I have an HTML page with a giant table on it listing the station names and each stations times. I want to be able to put my starting location in one box and my ending location in another box and have all the items in the table disappear that don't relate to either of the two locations typed in, leaving only two rows that match what was typed in (even if they don't spell it right or type it all the way) Similar to the jQuery quick search plugin

    Read the article

  • Java Mvc And Hibernate

    - by GigaPr
    Hi i am trying to learn Java, Hibernate and the MVC pattern. Following various tutorial online i managed to map my database, i have created few Main methods to test it and it works. Furthermore i have created few pages using the MVC patter and i am able to display some mock data as well in a view. the problem is i can not connect the two. this is what i have My view Looks like this <%@ include file="/WEB-INF/jsp/include.jsp" %> <html> <head> <title>Users</title> <%@ include file="/WEB-INF/jsp/head.jsp" %> </head> <body> <%@ include file="/WEB-INF/jsp/header.jsp" %> <img src="images/rss.png" alt="Rss Feed"/> <%@ include file="/WEB-INF/jsp/menu.jsp" %> <div class="ContainerIntroText"> <img src="images/usersList.png" class="marginL150px" alt="Add New User"/> <br/> <br/> <div class="usersList"> <div class="listHeaders"> <div class="headerBox"> <strong>FirstName</strong> </div> <div class="headerBox"> <strong>LastName</strong> </div> <div class="headerBox"> <strong>Username</strong> </div> <div class="headerAction"> <strong>Edit</strong> </div> <div class="headerAction"> <strong>Delete</strong> </div> </div> <br><br> <c:forEach items="${users}" var="user"> <div class="listElement"> <c:out value="${user.firstName}"/> </div> <div class="listElement"> <c:out value="${user.lastName}"/> </div> <div class="listElement"> <c:out value="${user.username}"/> </div> <div class="listElementAction"> <input type="button" name="Edit" title="Edit" value="Edit"/> </div> <div class="listElementAction"> <input type="image" src="images/delete.png" name="image" alt="Delete" > </div> <br /> </c:forEach> </div> </div> <a id="addUser" href="addUser.htm" title="Click to add a new user">&nbsp;</a> </body> </html> My controller public class UsersController implements Controller { private UserServiceImplementation userServiceImplementation; public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ModelAndView modelAndView = new ModelAndView("users"); List<User> users = this.userServiceImplementation.get(); modelAndView.addObject("users", users); return modelAndView; } public UserServiceImplementation getUserServiceImplementation() { return userServiceImplementation; } public void setUserServiceImplementation(UserServiceImplementation userServiceImplementation) { this.userServiceImplementation = userServiceImplementation; } } My servelet definitions <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <!-- the application context definition for the springapp DispatcherServlet --> <bean name="/home.htm" class="com.rssFeed.mvc.HomeController"/> <bean name="/rssFeeds.htm" class="com.rssFeed.mvc.RssFeedsController"/> <bean name="/addUser.htm" class="com.rssFeed.mvc.AddUserController"/> <bean name="/users.htm" class="com.rssFeed.mvc.UsersController"> <property name="userServiceImplementation" ref="userServiceImplementation"/> </bean> <bean id="userServiceImplementation" class="com.rssFeed.ServiceImplementation.UserServiceImplementation"> <property name="users"> <list> <ref bean="user1"/> <ref bean="user2"/> </list> </property> </bean> <bean id="user1" class="com.rssFeed.domain.User"> <property name="firstName" value="firstName1"/> <property name="lastName" value="lastName1"/> <property name="username" value="username1"/> <property name="password" value="password1"/> </bean> <bean id="user2" class="com.rssFeed.domain.User"> <property name="firstName" value="firstName2"/> <property name="lastName" value="lastName2"/> <property name="username" value="username2"/> <property name="password" value="password2"/> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property> <property name="prefix" value="/WEB-INF/jsp/"></property> <property name="suffix" value=".jsp"></property> </bean> </beans> and finally this class to access the database public class HibernateUserDao extends HibernateDaoSupport implements UserDao { public void addUser(User user) { getHibernateTemplate().saveOrUpdate(user); } public List<User> get() { User user1 = new User(); user1.setFirstName("FirstName"); user1.setLastName("LastName"); user1.setUsername("Username"); user1.setPassword("Password"); List<User> users = new LinkedList<User>(); users.add(user1); return users; } public User get(int id) { throw new UnsupportedOperationException("Not supported yet."); } public User get(String username) { return null; } } the database connection occurs in this file <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org.hsqldb.jdbcDriver"/> <property name="url" value="jdbc:hsqldb:hsql://localhost/rss"/> <property name="username" value="sa"/> <property name="password" value=""/> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" > <property name="dataSource" ref="dataSource" /> <property name="mappingResources"> <list> <value>com/rssFeed/domain/User.hbm.xml</value> </list> </property> <property name="hibernateProperties" > <props> <prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop> </props> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <bean id="userDao" class="com.rssFeed.dao.hibernate.HibernateUserDao"> <property name="sessionFactory" ref="sessionFactory"/> </bean> </beans> Could you help me to solve this problem i spent the last 4 days and nights on this issue without any success Thanks

    Read the article

  • Finding users whose birtday is today with JPA

    - by Jeduan Cornejo
    Hi, I have a table with users and are trying to get a list with the people who have birthday today so the app can send an email. The User is defined as @Entity public class User { @Size(max = 30) @NotNull private String name; [...] @Temporal(TemporalType.DATE) @DateTimeFormat(style = "S-") protected Date birthday; } and I've got a method which returns the people which were born today like so @SuppressWarnings("unchecked") public static List<User> findUsersWithBirthday() { List<User> users = entityManager().createQuery("select u from User u where u.birthday = :date") .setParameter("date", new Date(), TemporalType.DATE) .getResultList(); return users; } This is fine and all for finding people which were born today, however tha's not really that useful, so I've been struggling for a way to find all the users that were born today, independent of the year. Using MySQL there's functions I can use like select month(curdate()) as month, dayofmonth(curdate()) as day However I've been struggling to find a JPA equivalent to that. I'm using Spring 3.0.1 and Hibernate 3.3.2

    Read the article

  • What are the advantages of using J2EE over ASP.net?

    - by m_oLogin
    We are currently planning to launch a couple of internal web projects in the future. Our company's dev teams are mostly experienced in J2EE and have worked with it for years. Today, we have the choice of launching a couple of our projects on .net. I have checked out a couple of sources on the net, and it seems like the "J2EE vs ASP.net" combat brings out as much discord as the overseen "Apple vs Microsoft" or "Free Eclipse vs Visual Studio"... Nevertheless, I have been somewhat quite impressed with ASP.net's abilities to create great things with huge simplicity (for ex. asp.net ajax's demos). No more tons of xmls to play with, no more tons of frameworks to configure (we usually use the famous combo struts/spring/hibernate)... It just seemed to me that ASP.net had some good advantages over J2EE, but then again, I may speak by ignorance. What I want to know is this : What are the real advantages of using J2EE over ASP.net? Is there anything that cannot be done in ASP.net that can be done in J2EE? Once the frameworks are all in place and configured, is it faster to develop apps in J2EE than it is in .net? Are the applications generally easier to maintain in J2EE than in ASP.net? Is it worth it for some developpers to leave their J2EE knowledge on the side and move on to ASP.net if it does exactly the same thing?

    Read the article

  • Framework or design pattern for mailing all users of a webapp

    - by Todd Owen
    My app takes care of user registration (with the option to receive email announcements), and can easily handle the actual template-based rendering of email for a given user. JavaMail provides the mail transport layer. But how should I design the application layer between the business objects (e.g. User) and the mail transport? The straightforward approach would be a simple, synchronous loop: iterate through the users, queue the emails, and be done with it. "Queue" might mean sending them straight to the MTA (mail server), or to an in-memory queue to be consumed by another thread. However, I also plan to implement features like throttling the rate of emails, processing bounced emails (NDRs), and maintaining status across application restarts. My intuition is that a good design would decouple this from both the business layer and the mail transport layer as much as possible. I wondered if others had solved this problem before, but after much searching I haven't found any Java libraries which seem to fit this problem. Standalone mail apps such as James or list servers are too large in scope; packages like Spring's MailSender or Commons Email are too small in scope (being basically drop-in replacements for JavaMail). For other languages I haven't found anything appropriate either. I'm curious about how other developers have gone about adding bulk mailing to their applications.

    Read the article

  • Saving tree-structures in Databases

    - by Nina Null
    Hello everyone. I use Hibernate/Spring and a MySQL Database for my data management. Currently I display a tree-structure in a JTable. A tree can have several branches, in turn a branch can have several branches (up to nine levels) again, or having leaves. Lately I have performanceproblemes, as soon as I want to create new branches on deeper levels. At this time a branch has a foreign key to its parent. The domainobject has access to its parent by calling getParent(), which returns the parent-branch. The deeper the level, the longer it takes to create a new branch. Microbenchmark results for creating a new branch are like: Level 1: 32 ms. Level 3: 80 ms. Level 9: 232 ms. Obviously the level (which means the number of parents) is responsible for this. So I wanted to ask, if there are any appendages to work around this kind of problem. I don’t understand why Hibernate needs to know about the whole object tree (all parents until the root) while creating a new branch. But as far as I know this can be the only reason for the delay while creating a new branch, because a branch doesn’t have any other relations to any other objects. I would be very thankful for any workarounds or suggestions. greets, jambusa

    Read the article

  • Getting the avg of the top 10 students from each school

    - by dave
    Hi all -- We have a school district with 38 elementary schools. The kids took a test. The averages for the schools are widely dispersed, but I want to compare the averages of JUST THE TOP 10 students from each school. Requirement: use temporary tables only. I have done this in a very work-intensive, error-prone sort of way as follows. (sch_code = e.g., 9043; -- schabbrev = e.g., "Carter"; -- totpct_stu = e.g., 61.3) DROP TEMPORARY TABLE IF EXISTS avg_top10 ; CREATE TEMPORARY TABLE avg_top10 ( sch_code VARCHAR(4), schabbrev VARCHAR(75), totpct_stu DECIMAL(5,1) ); INSERT INTO avg_top10 SELECT sch_code , schabbrev , totpct_stu FROM test_table WHERE sch_code IN ('5489') ORDER BY totpct_stu DESC LIMIT 10; -- I do that last query for EVERY school, so the total -- length of the code is well in excess of 300 lines. -- Then, finally... SELECT schabbrev, ROUND( AVG( totpct_stu ), 1 ) AS top10 FROM avg_top10 GROUP BY schabbrev ORDER BY top10 ; -- OUTPUT: ----------------------------------- schabbrev avg_top10 ---------- --------- Goulding 75.4 Garth 77.7 Sperhead 81.4 Oak_P 83.7 Spring 84.9 -- etc... Question: So this works, but isn't there a lot better way to do it? Thanks! PS -- Looks like homework, but this is, well...real.

    Read the article

  • How to link different Servlet together?

    - by Harry Pham
    First of all, I did not use Spring MVC. :) :) Just want to get it out first. Now what I have is different JSP pages that making calls to different Servlets. All the pieces work great individually but I kind of need to link them together. If all of jsp pages make GET request then it would be easy, since I would just pass a type via the web address, and on my servlet side, I would just enumerated through all the parameter, determine which type is it, and delegate to the right servlet. But not all jsp pages make GET request, some make POST request via form. Let see example A.jsp $.getJSON('GenericServlet?type=A', ... GenericServlet.java String type = request.getParameter("type"); if(type.equals("A")){ //Somehow delegate to Servlet A (Not sure how to do that yet :)) } but in B.jsp I would have something like this B.jsp <form action="GenericServlet" method="post"> <table border=0 cellspacing=10 cellpadding=0> <tr> <td>User Name:</td> <td><input type="text" name="username" size=22/></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password" size=22/></td> </tr> </table> <input type="submit" value="Create User" /> </form> It kind of hard for me to determine in GenericServlet.java that this need to go to servletB

    Read the article

  • JSF 2 - clearing component attributes on page load?

    - by jamiebarrow
    Hi, The real question: Is there a way to clear certain attributes for all components on an initial page load? Background info: In my application, I have a JSF 2.0 frontend layer that speaks to a service layer (the service layer is made up of Spring beans that get injected to the managed beans). The service layer does its own validation, and I do the same validation in the frontend layer using my own validator classes to try and avoid code duplication somehow. These validator classes aren't JSF validators, they're just POJOs. I'm only doing validation on an action, so in the action method, I perform validation, and only if it's valid do I call through to the service layer. When I do my validation, I set the styleClass and title on the UIComponents using reflection (so if the UIComponent has the setStyleClass(:String) or setTitle(:String) methods, then I use them). This works nicely, and on a validation error I see a nicely styled text box with a popup containing the error message if I hover over it. However, since the component is bound to a Session Scoped Managed Bean, it seems that these attributes stick. So if I navigate away and come back to the same page, the styleClass and title are still in the error state. Is there a way to clear the styleClass and title attributes on each initial page load? Thanks, James P.S. I'm using the action method to validate because of some issues I had before with JSF 1.2 and it's validation methods, but can't remember why... so that's why I'm using the action method to validate.

    Read the article

  • How do i change the property of jaxrs endpoint to support "mtom"

    - by rocwing
    I created a RESTful web service, and i want to send binary files to this service without soap. There are some information on CXF website: link text But i can't find a way to get the CXF jaxrs endpoints,and set an "mtom-enabled" property. My Spring config is: <jaxrs:server id="fis" address="http://172.20.41.40:8080/fis"> <jaxrs:serviceBeans> <ref bean="FaultInfoResource" /> <ref bean="ExplorationResultResource" /> </jaxrs:serviceBeans> </jaxrs:server> <bean id="FaultInfoService" parent="baseService" class="com.dfe.demo.FaultInfoService"> </bean> <bean id="FaultInfoResource" class="com.dfe.demo.FaultInfoResource"> <property name="faultInfoService" ref="FaultInfoService"/> </bean> And i server class is: ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"com/dfe/iss/config/applicationContext.xml","com/dfe/demo/yearlyplan/cxf-servlet.xml"}); JAXRSServerFactoryBean fib = (JAXRSServerFactoryBean)ctx.getBean("fis"); fib.create();

    Read the article

  • file upload in JSF using myfaces component

    - by prt
    Hi, all i am creating a JSF application where file uploading functionality is required.I have added all the required jar files in my /WEB-INF/lib folder. jsf-api.jar jsf-impl.jar jstl.jar standard.jar myfaces-extensions.jar commons-collections.jar commons-digester.jar commons-beanutils.jar commons-logging.jar commons-fileupload-1.0.jar but still when trying to deploy the application on apache 6.0.29 i am getting the following error. org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored. org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart PM org.apache.catalina.core.StandardContext start SEVERE: Context [/jsfApplication] startup failed due to previous errors org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc The web application [/jsfApplication] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/jsfApplication] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/jsfApplication] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository. i am using also using hibernate and spring framework for this application. please help. thanks,

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99  | Next Page >