Search Results

Search found 221 results on 9 pages for 'jee'.

Page 8/9 | < Previous Page | 4 5 6 7 8 9  | Next Page >

  • JPA in distributed Java EE configuration

    - by sof
    Hello, I'm developing a JEE application to run on Glassfish: Database (javaDB, MS SQL, MySQL or Oracle) EJB layer with JPA (Toplink essentials - from Glassfish) for database access JSF/Icefaces based web UI accessing the EJB layer The application will have a lot of concurrent web client, so I want to run it on different physical servers and use a load-balancer. My problem is now how to keep the applications synchronized. I intend to set up multiple servers, each running Glassfish with my EAR app installed. Whenever on one of the servers data is added to or removed from the database (via JPA, no direct SQL queries), this change should be reflected in the JPA layer on the other servers. I've been looking around for solutions to this, but couldn't find anything I really like (the full Toplink from Oracle claims to have a solution, but don't know). Doing a refresh before every access to a JPA entity could work, but is far from efficient. Are there any patterns, libraries, ... that could help here? Thanks a lot!

    Read the article

  • Spring deployment-level configuration

    - by Robert Wilson
    When I wrote JEE apps, I used JBoss Datasources to control which databases the deployment used. E.g. the dev versions would use a throwaway hibernate db, the ref and ops would use stable MySQL deployments. I also used MBeans to configure various other services and rules. Now that I'm using Spring, I'd like the same functionality - deploy the same code, but with different configuration. Crucially, I'd also like Unit Tests to still run with stub services. My question is this - is there a way, in JBoss, to inject configuration with files which live outside of the WAR/EAR, and also include these files in test resources.

    Read the article

  • Spring 3, Java EE 6

    - by arg20
    I'm learning Java EE 6. I've seen how much progress it has achieved in this release of the umbrella specification. EJBs 3.1 are far easier and more lightweight than previous versions, and CDI is amazing. I'm not familiar with Spring, but I often read that it offered some neat features that the Java EE stack didn't. Yet I also read now that JEE has caught up, and can now fully compete with Spring. I know that choosing from both depends on many factors, but if we only focus on features, say the latest trends etc. Which one has the leading edge?. Can Spring 3 offer some assets The JAVA EE 6 stack can't? Also, what about Seam framework? From what I read it's like java ee 6 but with some additions?

    Read the article

  • Include multiple jars with classpathentry

    - by ripper234
    I have an eclipse's .classpath file that looks like this: <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="test"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> <classpathentry kind="lib" path="/libraries/jee/servlet-api.jar"/> <classpathentry kind="lib" path="/libraries/junit/junit-4.6.jar"/> <classpathentry kind="lib" path="/libraries/log4j/log4j-1.2.15.jar"/> </classpath> I'd like to add a whole directory of jars to the classpath - I like eclipse (or more precisely, our ant-based build process that uses .classpath format) to know several jars that reside in a single directory, without specifying them directly. How can I do that?

    Read the article

  • How does ‘Servers’ view work underlying in Eclipse?

    - by Michael Lu
    ‘Servers’ is built-in view in Eclipse. We could integrate jee server into Eclipse easily. It could start/stop server both in normal and debug modes. Moreover, we could even set timeout and deployment path, things like that. Various types of server tomcat, jboss, websphere are supported, no intrusive to server. I am just curious about how these cool things happen behind the scene. The complete mechanism is large and complex, so I just want to know general mechanism about it, an article also could be fine for me. Thank you!

    Read the article

  • Data manipulation without server side

    - by monczek
    Hi, I have to create a very simple webpage to show, filter and add data from not-yet-defined source (probably txt/xml/cvs). Records should be visible as a table, filtered using 3 criteria fields. There should be also possibility to add new records. My first thought was: XHTML + jQuery + csv2table + PicNet Table Filter. It does exactly what I want except adding rows - that is saving changes in source file (probably due to security risk). My question is - is there any possibility to do it without involving server side like asp.net, jee, php, sql? Source file is located on the server. Thanks for your ideas :-)

    Read the article

  • Integrating Oracle Forms Applications 11g Into SOA (4-6/Mai/10)

    - by Claudia Costa
    Workshop Description This is a Free workshop of 3 days is targeted at Oracle Forms professionals interested in integrating Oracle Forms into a Service Oriented Architecture. The workshop highlights how Forms can be part of a Service Oriented Architecture, how the Oracle Forms functionalities make it possible to integrate existing (or new) Forms applications with new or existing development utilizing the Service Oriented Architecture concepts. The goal is to understand the incremental approach that Forms provides to developers who need to extend their business platform to JEE, allowing Oracle Forms customers to retain their investment in Oracle Forms while leveraging the opportunities offered by complementing technologies. During the event the attendees will implement the Oracle Forms functionalities that make it possible to integrate with SOA. Register Now! Prerequisites ·         Knowledge of the Oracle Forms development environment (mandatory) ·         Basic knowledge of the Oracle database ·         Basic knowledge of the Java Programming Language ·         Basic knowledge of Oracle Jdeveloper or another Java IDE   System Requirements   This workshop requires attendees to provide their own laptops for this class. Attendee laptops must meet the following minimum hardware/software requirements:   ·         Laptop/PC with minimum 4 GB RAM ·         Oracle Database ·         Oracle Forms 11g R1 PS1 (WebLogic Server 10.1.3.2 + Portal, Forms, Reports and Discoverer ) ·         Oracle JDeveloper 11g R1 PS1 http://download.oracle.com/otn/java/jdeveloper/1112/jdevstudio11112install.exe ·         TCP-IP Loopback Adapter Installation (before the SOASuite installation) ·         Oracle SOASuite 11g R1 PS1 (without BAM component) When asked for an admin password, please use 'welcome1 http://download.oracle.com/otn/nt/middleware/11g/ofm_rcu_win_11.1.1.2.0_disk1_1of1.zip http://download.oracle.com/otn/nt/middleware/11g/ofm_soa_generic_11.1.1.2.0_disk1_1of1.zip ·         Oracle BI Publisher 10.1.3.4.1 http://download.oracle.com/otn/nt/ias/101341/bipublisher_windows_x86_101341.zip ·         Oracle BI Publisher Desktop 10.1.3.4. http://download.oracle.com/otn/nt/ias/101341/bipublisher_desktop_windows_x86_101341.zip   ·         At least 1 Oracle Forms solution already upgraded to the Oracle FMW 11g platform.   ------------------------------------------------------------------------------------------   Horário e Local:   4-6 de Maio / 9:30-18:00h Oracle, Porto Salvo Register Here Para mais informação por favor contacte: [email protected]

    Read the article

  • Error trapping for a missing data source in a Spring MVC / Spring JDBC web app [migrated]

    - by Geeb
    I have written a web app that uses Spring MVC libraries and Spring JDBC to connect to an Oracle DB. (I don't use any ORM type libraries as I create stored procedures on Oracle that do my stuff and I'm quite happy with that.) I use a connection pool to Oracle managed by the Tomcat container The app generally works absolutely fine by the way! BUT... I noticed the other day when I tried to set up the app on another Tomcat instance that I had forgotten to configure the connection pool and obviously the app could not get hold of an org.apache.commons.dbcp.BasicDataSource object, so it crashed. I define the pool params in the tomcat "context.conf" In my "web.xml" I have: <servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/Spring/appServlet/servlet-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>appServlet</servlet-name> <!-- Map *everything* to appServlet --> <url-pattern>/</url-pattern> </servlet-mapping> <resource-ref> <description>Oracle Datasource example</description> <res-ref-name>jdbc/ora1</res-ref-name> <res-type>org.apache.commons.dbcp.BasicDataSource</res-type> <res-auth>Container</res-auth> </resource-ref> And I have a Spring "servlet-context.xml" where JNDI is used to map the data source object provided by the connection pool to a Spring bean with the ID of "dataSource": <jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/ora1" resource-ref="true" /> Here's the question: Where do I trap the case where the database cannot be accessed for whatever reason? I don't want the user to see a yard-and-a-half of Java stack trace in their browser, rather a nicer message that tells them there is a database problem etc. It seems that my app tries to configure the "dataSource" bean (in "servlet-context.xml") before any code has tested it can actually provide a dataSource object from the pool?! Maybe I'm not fully understanding exactly what is going on in these stages of the app firing up ... Thanks for any advice!

    Read the article

  • Am 10.02. startet WebCast-Serie für Java Entwickler und WebLogic Interessenten: WebLogic Developer - Get the latest on Oracle WebLogic Server and Java EE 6

    - by Thomas Leopold
    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 21 false false false DE X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Accelerate Your Development with Oracle WebLogic Suite Many organisations are reducing travel, conference, and training budgets for their developers without any change to the results expected of those developers. So how can you keep up with the latest developments?By receiving training, delivered free of charge, at your desk!Join us during February and March for a series of online events designed and run by the development team at Oracle. Learn how Oracle WebLogic Suite enables a whole new level of productivity for enterprise developers.Virtual Developer Day - 10th FebruaryStarting with our Virtual Developer Day on 10th February, join us for a blend of hands-on labs, live chat and presentations covering the latest on WebLogic, Java EE 6 and the programming tenets that have made it a true platform breakthrough.Weekly WebLogic Webcasts from 17th February to 17th MarchAfterwards, join us every week from 17th February to 17th March for our weekly one-hour webcasts where we will show you how to build an application from the ground up using Java and JEE technologies. Presented by the engineering team for WebLogic, these webcasts will be of great value to developers and architects, not just those already using WebLogic.For registration, full session abstracts and schedule please click here. Don't miss out! Register now to join our virtual events and keep up with all the latest developments. Find out more and register now Copyright © 2011, Oracle Corporation and/or its affiliates.All rights reserved. Contact Us | Legal Notices and Terms of Use | Privacy Statement

    Read the article

  • My 2011 Professional Development Goals

    - by kerry
    I thought it might be a good idea to post some professional goals for 2011.  Hopefully, I can look at this list at the end of the year and have accomplished most of them. Release an Android app to the marketplace – I figured I would put this first because I have one that I have been working on for a while and it is about ready.  Along with this, I would like to start another one and continue to develop my Android skills. Contribute free software to the community – Again, I have an SMF plugin that will fill this requirement nicely.  Just need to give it some polish and release it.  That’s not all, I would like to add a few more libraries on github, or possibly contribute to an open source project. Regularly attend a user group meetings outside of Java – A great way to meet people and learn new things. Obtain the Oracle Certified Web Developer Certification – I got the SCJP a few years ago and would like to obtain another one.  One step closer to Certified Enterprise Architect. Learn scala – As a language geek, I like to stick to the Pragmatic Programmer’s ‘learn a new language every year’ rule (last year was Ruby).  Scala presents some new concepts all wrapped in a JVM-based OOP language.  Time to dig in. Write an app using JSF – New JEE 6 features are pretty slick.  I want to really leverage them in an app. Present at a user group meeting – Last but not least, I would like to improve my public speaking and skills in presenting.  Also, is a great reason to dig in to some latest and greatest tech. Use git more, and more effectively – Trying to move all my personal projects from Subversion to Git. That’s it.  A little daunting, but I am confident I can at least touch on most of these and it’s a great roadmap to my professional development.

    Read the article

  • Eclipse Indigo freezes on 'Open Type' search

    - by NickGreen
    When I'm trying to search for a Java class with Ctrl-shift-T (Open Type popup), Eclipse freezes when I'm typing 1 character. It usually takes about 8 seconds to 'unfreeze', but sometimes it won't come back at all.. When it freezes, I see that the eclipse process takes about 1Gig of mem and the CPU is about 100%! I've tried creating a new workspace, adjusting the eclipse.ini (perm size, different memory values), starting with -clean and at last reinstall the whole IDE. Nothing helps.. My eclipse.ini: -startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505 -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 768m --launcher.defaultAction openFile -vmargs -server -Dosgi.requiredJavaVersion=1.5 -Xmn128m -Xms1024m -Xmx1024m -Xss2m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseParallelGC -Djava.library.path=/usr/lib/jni I'm using the following plugins: JRebel and m2e. I'm desperate for a solution because this problems causes me a great deal of time loss. System: Ubuntu 12.04 LTS 64 bit, 4GB mem, Intel core i7 860 @ 2.8 Ghz. Hope somebody knows a solution. Thank you for your time.

    Read the article

  • Oracle Forms Migration to ADF - Webinar vom ORACLE Partner PITSS

    - by Thomas Leopold
      Tuesday, February 22, 2011 5:00 PM - 6:00 PM CET Free Webinar Re-Engineering Legacy Oracle Forms Migration from Forms to ADF - A Case Study Join Oracle's Grant Ronald and PITSS to see a software architecture comparison of Oracle Forms and ADF and a live step-by-step presentation on how to achieve a successful migration. Learn about various migration options, challenges and best practices to protect your current investment in Oracle Forms. PL/SQL is without match for what it does: manipulating data in the database. If you blindly migrate all your PL/SQL to Java you will, in all probability, end up with less maintainable and less efficient code. Instead you should consider which code it best left as PL/SQL..." Grant Ronald - "Migrating Oracle Forms to Fusion: Myth or Magic Bullet?" Re-Engineering existing business logic is mandatory for your legacy Forms application to take advantage of the new Software architectures like ADF. The PITSS.CON solution combines the deep understanding of Oracle Forms and Reports applications architecture with powerful re-engineering capabilities that allows the developer community to protect the investment in the existing Forms applications and to concentrate on fine-tuning and customization of the modernized functionality rather than manually recreating every module and business logic from bottom up. Registration: https://www2.gotomeeting.com/register/971702250   PITSS GmbHKönigsdorferstrasse 25D-82515 WolfratshausenDo not forget to check out these Free Webinars in March! Thursday, March 3, 2011 Upgrade and Modernize Your Application to Forms 11g Registration/Information Tuesday, March 15, 2011 Shaping the Future for your Oracle Forms Application:Forms 11g, ADF, APEX Registration/Information Tuesday, March 29, 2011 Oracle Forms Modernization to APEX Registration/Information Registration is limited, so sign up  today!Presented By:        Grant Ronald, Senior Group Product Manager,Oracle       Magdalena Serban, Product Manager,PITSS   Contact Us:            PITSS in Americas +1 248.740.0935 [email protected] www.pitssamerica.com       PITSS in Europe +49 (0) 717287 5200 [email protected] www.pitss.com   White Paper:      From Oracle Forms to Oracle ADF and JEE     © Copyright 2010 PITSS GmbH, Wolfratshausen, Stuttgart, München; Managing Directors: Dipl.-Ing. Andreas Gaede, Michael Kilimann, Dipl.-Ing. Dirk Fleischmann Commercial Register: HRB 125471 at District Court Munich. All rights reserved. Any duplication or further treatment in any medium, in parts or as a whole, requires a written agreement. If you do not want to receive invitations for events, meetings and seminars from us, then please click here.

    Read the article

  • SQLAuthority News – Amazon Gift Card Raffle for Beta Tester Feedback for NuoDB

    - by pinaldave
    As regular readers know I’ve been spending some time working with the NuoDB beta software. They contacted me last week and asked if I would give you a chance to try their new web-based console for their scalable, SQL-compliant database. They have just put out their final beta release, Beta 9.  It contains a preview of a new web-based “NuoConsole” that will replace and extend the functionality of their current desktop version.  I haven’t spent any time with the new console yet but a really quick look tells me it should make it easier to do deeper monitoring than the older one. It also looks like they have added query-level reporting through the console. I will try to play with it soon. NuoDB is doing a last, big push to get some more feedback from developers before they release their 1.0 product sometime in the next several weeks. Since the console is new, they are especially interested in some quick feedback on it before general availability. For SQLAuthority readers only, NuoDB will raffle off three $50 Amazon gift cards in exchange for your feedback on the NuoConsole preview. Here’s how to Enter Download NuoDBeta 9 here You must build a domain before you can start the console. Launch the Web Console. Windows Code: start java -jar jarnuodbwebconsole.jar Mac, Linux, Solaris, Unix Code: java -jar jar/nuodbwebconsole.jar Access the Web Console: Code: http://localhost:8080 When you have tried it out, go to a short (8 question) survey to enter the raffle Click here for the survey You must complete the survey before midnight EDT on October 17, 2012. Here’s what else they are saying about this last beta before general availability: Beta 9 now supports the Zend PHP framework so that PHP developers can directly integrate web applications with NuoDB. Multi-threaded HDFS support – NuoDB Storage Managers can now be configured to persist data to the high performance Hadoop distributed file system (HDFS). Beta 9 optimizes for multi-thread I/O streams at maximum performance. This enhancement allows users to make Hadoop their core storage with no extra effort which is a pretty cool idea. Improved Performance –On a single transaction node, Beta 9 offers performance comparable with MySQL and MariaDB. As additional nodes are added, NuoDB performance improves significantly at near linear scale. Query & Explain Plan Logging – Beta 9 introduces SQL explain plans for your queries. Qualify queries with the word “EXPLAIN” and NuoDB will respond with the details of the execution plan allowing performance optimization to SQL. Through the NuoConsole, you can now kill hung or long running queries. Java App Server Support – Beta 9 now supports leading Web JEE app servers including JBoss, Tomcat, and ColdFusion. They’ve also reported: Improved PHP/PDO drivers Support for Drupal Faster Ruby on Rails driver The Hibernate Dialect supports version 4.1 And good news for my readers: numerous SQL enhancements They will share the results of the web console feedback with me.  I’ll let you know how it goes. Also the winner of their last contest was Jaime Martínez Lafargue!  Do leave a comment here once you complete the survey.  Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: SQL Authority Tagged: NuoDB

    Read the article

  • Maven WTP webapp with maven-eclipse-plugin but without m2eclipse

    - by chrsk
    I use the eclipse:eclipse goal to generate an Eclipse Project environment. The deployment works fine. The goal creates the var classpath entries for all needed dependencies. With m2eclipse there was the Maven Container which defines an export folder which was WEB-INF/lib for me. But i don't want to rely on m2eclipse so i don't want to use it anymore. the class path entries which are generated by eclipse:eclipse goal don't have such a export folder. While booting the servlet container with WTP it publishes all resources and classes except the libraries to the context. Whats missing to publish the needed libs, or isn't that possible without m2eclipse integration? IDE Configuration Eclipse 3.5 JEE Galileo Maven 2 m2eclipse The maven-eclipse-plugin configuration <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.8</version> <configuration> <projectNameTemplate>opensaga-[artifactId]</projectNameTemplate> <useProjectReferences>false</useProjectReferences> <downloadSources>false</downloadSources> <downloadJavadocs>false</downloadJavadocs> <wtpmanifest>true</wtpmanifest> <wtpversion>2.0</wtpversion> <wtpapplicationxml>true</wtpapplicationxml> <wtpContextName>opensaga-[artifactId]</wtpContextName> <additionalProjectFacets> <jst.java>5.0</jst.java> <jst.web>2.3</jst.web> </additionalProjectFacets> </configuration> </plugin>

    Read the article

  • [OffTopic] PhD is it worth it?

    - by Zenzen
    So I'll be graduating next year (hopefully) and lately I started thinking about getting a PhD in computer science (to be more precise I was thinking about something related to "distributed systems", don't have any specific topics yet in mind), but is it really worth it? A PhD course here lasts 4 years and is free IF you're doing the "normal one" (which means you have class from monday to friday) OR you have to pay if you want to study on the weekends. So I've been thinking about getting a normal full time job (as a JEE programmer) and doing my PhD during the weekends OR doing the normal PhD course (mon-fri) and getting a part time job as a software dev (the main reason I want a job is simple - I need to eat). That would give me practical working experience and theoretical knowledge+a PhD, but it would also mean working 7days a week from 9 to 5 for 4 years straight (sounds like an overkill). Is it, job wise, really worth getting a PhD? As an employer do you prefer people with PhDs or MScs? This might be kinda important - I'm not from the US or western europe, how are PhDs from other countries (I am graduating one of the best, if not the best, school in my country but it's still a central european country...) seen? Are they useless? I won't hide it - after graduation I am thinking about moving abroad.

    Read the article

  • How to inject a Session Bean into a Message Driven Bean?

    - by Hank
    Hi guys, I'm reasonably new to JEE, so this might be stupid.. bear with me pls :D I would like to inject a stateless session bean into a message-driven bean. Basically, the MDB gets a JMS message, then uses a session bean to perform the work. The session bean holds the business logic. Here's my Session Bean: @Stateless public class TestBean implements TestBeanRemote { public void doSomething() { // business logic goes here } } The matching interface: @Remote public interface TestBeanRemote { public void doSomething(); } Here's my MDB: @MessageDriven(mappedName = "jms/mvs.TestController", activationConfig = { @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) public class TestController implements MessageListener { @EJB private TestBean testBean; public TestController() { } public void onMessage(Message message) { testBean.doSomething(); } } So far, not rocket science, right? Unfortunately, when deploying this to glassfish v3, and sending a message to the appropriate JMS Queue, I get errors that glassfish is unable to locate the TestBean EJB: java.lang.IllegalStateException: Exception attempting to inject Remote ejb-ref name=mvs.test.TestController/testBean,Remote 3.x interface =mvs.test.TestBean,ejb-link=null,lookup=null,mappedName=,jndi-name=mvs.test.TestBean,refType=Session into class mvs.test.TestController Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-ref name=mvs.test.TestController/testBean,Remote 3.x interface =mvs.test.TestBean,ejb-link=null,lookup=null,mappedName=,jndi-name=mvs.test.TestBean,refType=Session into class mvs.test.TestController Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/mvs.test.TestController/testBean' in SerialContext [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=mvs.test.TestController/testBean,Remote 3.x interface =mvs.test.TestBean,ejb-link=null,lookup=null,mappedName=,jndi-name=mvs.test.TestBean,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'mvs.test.TestBean#mvs.test.TestBean' [Root exception is javax.naming.NamingException: Lookup failed for 'mvs.test.TestBean#mvs.test.TestBean' in SerialContext [Root exception is javax.naming.NameNotFoundException: mvs.test.TestBean#mvs.test.TestBean not found]]] So my questions are: - is this the correct way of injecting a session bean into another bean (particularly a message driven bean)? - why is the naming lookup failing? Thanks for all your help! Cheers, Hank

    Read the article

  • Servlet receives null from Remote EJB3 Session Bean

    - by Hank
    I'm sure this is a beginner error... So I have a JEE6 application with entities, facades (implementing the persistence layer) and Stateless Session Beans (EJB3) with Remote interfaces (providing access to the entities via facades). This is working fine. Via the SLSB I can retrieve and manipulate entities. Now, I'm trying to do this from a Web Application (deployed on the same Glassfish, entity+interface definitions from JEE app imported as separate jar). I have a Servlet, that receives an instance of the SLSB injected. I get it to retrieve an entity, and the following happens (I can see it in the logs): the remote SLSB gets instantiated, its method called SLSB instantiates the facade, calls the 'get' method facade retrieves object from DB, returns it SLSB returns the object to the caller (all is good until here) calling servlet receives .. null !! What is going wrong? This should work, right? MyServlet: public class MyServlet extends HttpServlet { @EJB private CampaignControllerRemote campaignController; // remote SLSB protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/plain"); PrintWriter out = response.getWriter(); try { Campaign c = campaignController.getCampaign(5L); // id of an existing campaign out.println("Got "+ c.getId()); // c is null !! } finally { out.close(); } } ... } Pls let me know if you want to see other code, and I'll update the post.

    Read the article

  • How to use 3rd party libraries in glassfish?

    - by Hank
    I need to connect to a MongoDB instance from my EJB3 application, running on glassfish 3.0.1. The Mongo project provides a set of drivers, and I'm able to use them in a standalone Java application. How would I use them in a JEE application? Or maybe better phrasing: how would I make a 3rd party library available to my application when it runs in an EJB container? At the moment, I'm getting a java.lang.NoClassDefFoundError when deploying a bean that tries to import from the library: [#|2010-03-24T11:42:15.164+0100|SEVERE|glassfishv3.0|global|_ThreadID=28;_ThreadName=Thread-1;|Class [ com/mongodb/DBObject ] not found. Error while loading [ class mvs.core.LocationCacheService ]|#] [#|2010-03-24T11:42:15.164+0100|WARNING|glassfishv3.0|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=28;_ThreadName=Thread-1;|Error in annotation processing: java.lang.NoClassDefFoundError: com/mongodb/DBObject|#] [#|2010-03-24T11:42:15.259+0100|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=28;_ThreadName=Thread-1;|Exception while loading the app org.glassfish.deployment.common.DeploymentException: java.lang.NoClassDefFoundError: com/mongodb/DBObject at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:171) at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338) I tried adding it to the NetBeans project (Properties - Libraries - Compile - Add Jar, enable 'Package'), and I also tried manually copying the jar file to $GF_HOME/glassfish/domains/domain1/lib (where the mysql-connector already resides). Do I need to 'register' the library with the container? Reference it via Annotation? Extend the classpath of the container to include the library?

    Read the article

  • Map enum in JPA with fixed values ?

    - by Kartoch
    I'm looking for the different ways to map an enum using JPA. I especially want to set the integer value of each enum entry and to save only the integer value. @Entity @Table(name = "AUTHORITY_") public class Authority implements Serializable { public enum Right { READ(100), WRITE(200), EDITOR (300); private int value; Right(int value) { this.value = value; } public int getValue() { return value; } }; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "AUTHORITY_ID") private Long id; // the enum to map : private Right right; } A simple solution is to use the Enumerated annotation with EnumType.ORDINAL: @Column(name = "RIGHT") @Enumerated(EnumType.ORDINAL) private Right right; But in this case JPA maps the enum index (0,1,2) and not the value I want (100,200,300). Th two solutions I found do not seem simple... First Solution A solution, proposed here, uses @PrePersist and @PostLoad to convert the enum to an other field and mark the enum field as transient: @Basic private int intValueForAnEnum; @PrePersist void populateDBFields() { intValueForAnEnum = right.getValue(); } @PostLoad void populateTransientFields() { right = Right.valueOf(intValueForAnEnum); } Second Solution The second solution proposed here proposed a generic conversion object, but still seems heavy and hibernate-oriented (@Type doesn't seem to exist in JEE): @Type( type = "org.appfuse.tutorial.commons.hibernate.GenericEnumUserType", parameters = { @Parameter( name = "enumClass", value = "Authority$Right"), @Parameter( name = "identifierMethod", value = "toInt"), @Parameter( name = "valueOfMethod", value = "fromInt") } ) Is there any other solutions ? I've several ideas in mind but I don't know if they exist in JPA: use the setter and getter methods of right member of Authority Class when loading and saving the Authority object an equivalent idea would be to tell JPA what are the methods of Right enum to convert enum to int and int to enum Because I'm using Spring, is there any way to tell JPA to use a specific converter (RightEditor) ?

    Read the article

  • SSL certificate exception problem in Firefox

    - by Baztoune
    Hi there, and thanks in advance for your help or any tip that could get me out of here. I work on a JEE app with a JBoss server and an Apache. I'm not really familiar with SSL connections and certificates, I understand the basic, but I have to deal with it. So on my local configuration (localhost) I have my connection certificate configured on JBoss and Apache, and a USER_DEV.P12 file, which I import in my certificates in Firefox. I have the same configuration on a distant test server (test-server), and a USER_TEST.P12 which I also import in Firefox. When I access https://localhost/ or https://test-server/ Firefox asks me to add an exception, which is normal. After that, I select the appropriated user certificate, and can use my application normally. But for the second (let's say https://test-server/), Firefox rises me a sec_error_reused_issuer_and_serial error. Of course I googled it and founded the Mozilla help, So when I delete the "server" in my certificate manager, I can access again my second domain, but the same problem occurs for the first one. To shorten the problem, my 2 client/server certificate couples are OK but I can't have 2 certificate exceptions at the same time in Firefox for my 2 different servers/users, even though the names, server address, and MD5 are different. I notified the serial is the same (01), but it's working on my colleague's computer. So am I doing something wrong? Do I have to deal with it manually each time (or with Firefox profiles)? Thanks for your help. Bastien.

    Read the article

  • Why Java language does not offer a way to declare getters and setters of a given "field" through ann

    - by zim2001
    I actually happily design and develop JEE Applications for quite 9 years, but I realized recently that as time goes by, I feel more and more fed up of dragging all these ugly bean classes with their bunch of getters and setters. Considering a basic bean like this : public class MyBean { // needs getter AND setter private int myField1; // needs only a getter, no setter private int myField2; // needs only a setter, no getter private int myField3; /** * Get the field1 * @return the field1 */ public int getField1() { return myField1; } /** * Set the field1 * @param value the value */ public void setField1(int value) { myField1 = value; } /** * Get the field2 * @return the field2 */ public int getField2() { return myField2; } /** * Set the field3 * @param value the value */ public void setField3(int value) { myField3 = value; } } I'm dreaming of something like this : public class MyBean { @inout(public,public) private int myField1; @out(public) private int myField2; @in(public) private int myField3; } No more stupid javadoc, just tell the important thing... It would still be possible to mix annotation and written down getters or setters, to cover cases when it should do non-trivial sets and gets. In other words, annotation would auto-generate the getter / setter code piece except when a literate one is provided. Moreover, I'm also dreaming of replacing things like that : MyBean b = new MyBean(); int v = b.getField1(); b.setField3(v+1); by such : MyBean b = new MyBean(); int v = b.field1; b.field3 = v+1; In fact, writing "b.field1" on the right side of an expression would be semantically identical to write "b.getField1()", I mean as if it has been replaced by some kind of a preprocessor. It's just an idea but I'm wondering if I'm alone on that topic, and also if it has major flaws. I'm aware that this question doesn't exactly meet the SO credo (we prefer questions that can be answered, not just discussed) so I flag it community wiki...

    Read the article

  • launch eclipse,and an error occurs.

    - by chillwarmoon
    environment: Ubuntu 9.10 Eclipse eclipse-jee-galileo-SR2-linux-gtk When I login the ubuntu,and run the eclipse, it works. but when I changed to root user and then launch eclipse,there is an error occurs: (eclipse:5632): GLib-GObject-WARNING **: invalid (NULL) pointer instance (eclipse:5632): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed (eclipse:5632): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed (eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (eclipse:5632): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed (eclipse:5632): Gdk-CRITICAL **: gdk_display_get_pointer: assertion `GDK_IS_DISPLAY (display)' failed (eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (eclipse:5632): Gdk-CRITICAL **: gdk_screen_get_n_monitors: assertion `GDK_IS_SCREEN (screen)' failed (eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (eclipse:5632): Gdk-CRITICAL **: get_monitor: assertion `GDK_IS_SCREEN (screen)' failed Segmentation fault But when I login in Ubuntu as root, and run eclipse, it is ok. I changed to another non-root user,there is an error too. How to deal with this problem. I am looking forward to your reply. thanks.

    Read the article

  • Jboss EAP 5 and Tomcat 6 on the same Win env. (Jboss gets Toncat`s home page when`s up)

    - by Eddie
    Hi guys, I`m newbie to Java technologies, just trying to catch up some idea of it. I was trying to build a java environment to play with Eclipse, Mysql, Tomcat and Jboss and integrate these together. I did: 1. Installed jdk1.6.0_20 (including JAVA_HOME and path variables; I work on Win Vista), mysql 5 and eclipse-jee-galileo (the latest one, 3.6 I believe) and all went good - java programs are compiled and run getting a DB connection. 2. Installed Jboss enterprise-installer-5.0.1.jar with localhost:8080 and this also went good - run.bat started it and I could log in as admin thru its home page. I integrated it with eclipse and could start and stop it from there too. 3. I got apache-tomcat-6.0.26-windows-x86 and this also runs and stops from command line and from eclipse. But this one uses localhost:8080 without asking. Now the problem is when I start jboss I get Tomcat home page and I can`t fix it. Is it probably because both now use localhost:8080? BTW, does Jboss EAP 5 contain Tomcat inside and I shouldn't add that Tomcat separately? Thanks for you help in advance, Eddie

    Read the article

  • How does a java web project architecture look like without EJB3 ?

    - by Hendrik
    A friend and I are building a fairly complex website based on java. (PHP would have been more obvious but we chose for java because the educational aspect of this project is important to us) We have already decided to use JSF (with richfaces) for the front end and JPA for the backend and so far we have decided not to use EJB3 for the business layer. The reason we've decided not to use EJB3 is because - and please correct me if I am wrong - if we use EJB3 we can only run it on a full blown java application server like jboss and if we don't use EJB3 we can still run it on a lightweight server like tomcat. We want to keep speed and cost of our future web server in mind. So far i've worked on two JEE projects and both used the full stack with web business logic factories/persistence service entities with every layer a seperate module. Now here is my question, if you dont use EJB3 in the business logic layer. What does the layer look like? Please tell what is common practice when developing java web projects without ejb3? Do you think business logic layer can be thrown out altogether and have business logic in the backing beans? If you keep the layer, do you have all business methods static? Or do you initialize each business class as needed in the backing beans in every session as needed?

    Read the article

  • Which java technology should i use , if i want to build website with thousands of users

    - by Mirage
    Sorry for asking this question but i searched all java realted question but i got more confused. I am still not clear what should i start with 1)My main is build website in Java because someone told me that there are some machine learning or AI libraries available in java which i can use in java. so i decided to use that as it can reduce my work. Now i don't know java at all some people say following are used to build websites like 1)Servelts alone can build webiste 2)JSP alone can also build webiste 3)Struts 4)Spring with Hibernate 5)SEAM 6)JEE also for webistes Now guys i am confused where should i start from. Where does core JAVA fits in here. i was thinking of perhaps learning python as i know i have to learn Python only not its variations SO please guide me one thing which can solve my basic purpose of using ready made libraries of AI If i can do that with JSP then i will start with that. But i need to learn all of them then its better if can start learning python. I have 5 months to finish webiste. I really don't know why there are many braches of java for doing one thing Please help me.

    Read the article

< Previous Page | 4 5 6 7 8 9  | Next Page >