Search Results

Search found 872 results on 35 pages for 'jboss weld'.

Page 16/35 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Rolling File appender usage

    - by Anand
    What is a rollingfile appender ? I want my jboss to delete logs either exceeding a maximum size or exceeding a certain date. People on this forum have suggested me to use rollingfile appender. How do I configure it in jboss-log4j.xml file ?

    Read the article

  • Why reduce the size of the Java JVM thread stack?

    - by djangofan
    I was reading an article on handling Out Of Memory error conditions in Java (and on JBoss platform) and I saw this suggestion to reduce the size of the threadstack. Can anyone explain how "reducing" the size of threadstack will help with a max memory error condition? http://community.jboss.org/wiki/OutOfMemoryExceptions

    Read the article

  • Which is better: JNP or Corba?

    - by Juvinao
    Hello. I've try with EJB 3.0 and swing client and i've tried with glassfish and jboss as application server when i did use glassfish, the comunication is via corba. when i did use jboss, the comunication is via JNP. in my tests the JNP was faster than corba who has some like this?, and who could tell me which is better: JNP or Corba? and why? thanks

    Read the article

  • Seam EJB3 in an EAR is it usable by another App?

    - by Jim Ward
    Seam 2.1 and JBoss 4.2.2 I have set up the first App to have the EJB in the EAR with a local interface. the 2nd app can look up JDNI name "ear-name/ejbname/local" but fails with "NoClassDefFound". Does the EJB .jar need to be outside of the EAR? Is this a classloader visibility issue or Is this a JBoss version issue? or something else? Thank you for your thoughts..

    Read the article

  • Is it possible to destroy a CDI scope?

    - by Matt Ball
    I'm working on a Java EE application, primarily JAX-RS with a JSF admin console, that uses CDI/Weld for dependency injection with @ApplicationScoped objects. Minor debugging issues aside, CDI has worked beautifully for this project. Now I need some very coarse-grained control over CDI-injected object lifecycles. I need the ability to: Remove an injected object from the application context, or Destroy/delete/clear/reset/remove the entire application context, or Define my own @ScopeType and implementing Context in which I could provide methods to perform one of the two above tasks. I'm fully aware that this is across, if not against, the grain of CDI and dependency injection in general. I just want to know Is this remotely possible? If yes, what is the easiest/simplest/quickest/foolproofiest way to get the job done?

    Read the article

  • Is the Cloud ready for an Enterprise Java web application? Seeking a JEE hosting advice.

    - by Jakub Holý
    Greetings to all the smart people around here! I'd like to ask whether it is feasible or a good idea at all to deploy a Java enterprise web application to a Cloud such as Amazon EC2. More exactly, I'm looking for infrastructure options for an application that shall handle few hundred users with long but neither CPU nor memory intensive sessions. I'm considering dedicated servers, virtual private servers (VPSs) and EC2. I've noticed that there is a project called JBoss Cloud so people are working on enabling such a deployment, on the other hand it doesn't seem to be mature yet and I'm not sure that the cloud is ready for this kind of applications, which differs from the typical cloud-based applications like Twitter. Would you recommend to deploy it to the cloud? What are the pros and cons? The application is a Java EE 5 web application whose main function is to enable users to compose their own customized Product by combining the available Parts. It uses stateless and stateful session beans and JPA for persistence of entities to a RDBMS and fetches information about Parts from the company's inventory system via a web service. Aside of external users it's used also by few internal ones, who are authenticated against the company's LDAP. The application should handle around 300-400 concurrent users building their product and should be reasonably scalable and available though these qualities are only of a medium importance at this stage. I've proposed an architecture consisting of a firewall (FW) and load balancer supporting sticky sessions and https (in the Cloud this would be replaced with EC2's Elastic Load Balancing service and FW on the app. servers, in a physical architecture the load-balancer would be a HW), then two physical clustered application servers combined with web servers (so that if one fails, a user doesn't loose his/her long built product) and finally a database server. The DB server would need a slave backup instance that can replace the master instance if it fails. This should provide reasonable availability and fault tolerance and provide good scalability as long as a single RDBMS can keep with the load, which should be OK for quite a while because most of the operations are done in the memory using a stateful bean and only occasionally stored or retrieved from the DB and the amount of data is low too. A problematic part could be the dependency on the remote inventory system webservice but with good caching of its outputs in the application it should be OK too. Unfortunately I've only vague idea of the system resources (memory size, number and speed of CPUs/cores) that such an "average Java EE application" for few hundred users needs. My rough and mostly unfounded estimate based on actual Amazon offerings is that 1.7GB and a single, 2-core "modern CPU" with speed around 2.5GHz (the High-CPU Medium Instance) should be sufficient for any of the two application servers (since we can handle higher load by provisioning more of them). Alternatively I would consider using the Large instance (64b, 7.5GB RAM, 2 cores at 1GHz) So my question is whether such a deployment to the cloud is technically and financially feasible or whether dedicated/VPS servers would be a better option and whether there are some real-world experiences with something similar. Thank you very much! /Jakub Holy PS: I've found the JBoss EAP in a Cloud Case Study that shows that it is possible to deploy a real-world Java EE application to the EC2 cloud but unfortunately there're no details regarding topology, instance types, or anything :-(

    Read the article

  • JMS template credentials default value

    - by Gandalf StormCrow
    Hello everyone I'm trying to work with jboss messaging, does anyone knows the default value for these java.naming.security.principal and java.naming.security.credentials or how can I set them? <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop> <prop key="java.naming.provider.url">jnp://localhost:8080</prop> <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop> <prop key="java.naming.security.principal">value</prop> <prop key="java.naming.security.credentials">value</prop> </props> </property> </bean> I'm trying to instansiate the <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> I'm guessing that this is the cause why jboss timeouts when starts

    Read the article

  • How to deploy a rar file to jboss

    - by Joshua
    Refer original post here for a reference to the original issue. What plugin should I use to deploy the jackrabbit rar as a separate entity to the jboss installation. I tried the rar module within the maven-ear-plugin which was actually packaging this within the ear file and the rar plugin which seems to be used for packaging a rar. Currently I am using the antrun plugin to deploy the rar file and it's associated ds.xml, is there a different plugin to automate direct deployment.

    Read the article

  • Problem on jboss lookup entitymanager

    - by Stefano
    I have my ear-project deployed in jboss 5.1GA. From webapp i don't have problem, the lookup of my ejb3 work fine! es: ShoppingCart sc= (ShoppingCart) (new InitialContext()).lookup("idelivery-ear-1.0/ShoppingCartBean/remote"); also the iniection of my EntityManager work fine! @PersistenceContext private EntityManager manager; From test enviroment (I use Eclipse) the lookup of the same ejb3 work fine! but the lookup of entitymanager or PersistenceContext don't work!!! my good test case: public void testClient() { Properties properties = new Properties(); properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); properties.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces"); properties.put("java.naming.provider.url","localhost"); Context context; try{ context = new InitialContext(properties); ShoppingCart cart = (ShoppingCart) context.lookup("idelivery-ear-1.0/ShoppingCartBean/remote"); // WORK FINE } catch (Exception e) { e.printStackTrace(); } } my bad test : EntityManagerFactory emf = Persistence.createEntityManagerFactory("idelivery"); EntityManager em = emf.createEntityManager(); //test1 EntityManager em6 = (EntityManager) new InitialContext().lookup("java:comp/env/persistence/idelivery"); //test2 PersistenceContext em3 = (PersistenceContext)(new InitialContext()).lookup("idelivery/remote"); //test3 my persistence.xml <persistence-unit name="idelivery" transaction-type="JTA"> <jta-data-source>java:ideliveryDS</jta-data-source> <properties> <property name="hibernate.hbm2ddl.auto" value="create-drop" /><!--validate | update | create | create-drop--> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" /> <property name="hibernate.show_sql" value="true" /> <property name="hibernate.format_sql" value="true" /> </properties> </persistence-unit> my datasource: <datasources> <local-tx-datasource> <jndi-name>ideliveryDS</jndi-name> ... </local-tx-datasource> </datasources> I need EntityManager and PersistenceContext to test my query before build ejb... Where is my mistake?

    Read the article

  • Get email address from OpenId using Jboss/Seam

    - by Andy
    I'm using the org.jboss.seam.security.openid.OpenId class to login user's to my seam webapp. Currently I'm saving the validatedId (openid.getValidatedId()) into the database, and asking the user to provide their own email address and first and last name after logging in. I'm using Google, Yahoo, AOL, and MyOpenID for the openId Providers. Is there any way to retrieve the email address and or first/last name of the user without having them enter this in manually?

    Read the article

  • JSF 2.0: use Enum values for selectOneMenu

    - by yournamehere
    I'm using JSF 2.0 and want to fill a selectOneMenu with the values of my Enum. A simple example: // Sample Enum public enum Gender { MALE("Male"), FEMALE("Female"); private final String label; private Gender(String label) { this.label = label; } public String getLabel() { return this.label; } } Unfortunately, i can't use Seam for my current project, which had a nice <s:convertEnum/> Tag that did most of the work. In Seam, to use the values of the Enum, i had to write the following markup (and create a factory that provides the #{genderValues}: <!-- the Seam way --> <h:selectOneMenu id="persongender" value="#{person.gender}"> <s:selectItems var="_gender" value="#{genderValues}"" label="#{_gender.label}"/> <s:convertEnum/> </h:selectOneMenu> The result is that i don't have to declare the Enum values explicitely anymore inside the markup. I know that this is not very easy in JSF <2.0, but is there any new in JSF2 to help with this issue? Or does Weld help here somehow? If there is nothing new in JSF2, what's the easiest way to do it in JSF 1.2? Or can i even integrate the Seam JSF tag and the corresponding classes of Seam to get the same feature in a JavaEE6-App (without the Seam container)?

    Read the article

  • Where should I declare my CDI resources?

    - by Laird Nelson
    JSR-299 (CDI) introduces the (unfortunately named) concept of a resource: http://docs.jboss.org/weld/reference/1.0.0/en-US/html/resources.html#d0e4373 You can think of a resource in this nomenclature as a bridge between the Java EE 6 brand of dependency injection (@EJB, @Resource, @PersistenceContext and the like) and CDI's brand of dependency injection. The general gist seems to be that somewhere (and this will be the root of my question) you declare what amounts to a bridge class: it contains fields annotated both with Java EE's @EJB or @PersistenceContext or @Resource annotations and with CDI's @Produces annotations. The net effect is that Java EE 6 injects a persistence context, say, where it's called for, and CDI recognizes that injected PersistenceContext as a source for future injections down the line (handled by @Inject). My question is: what is the community's consensus--or is there one--on: what this bridge class should be named where this bridge class should live whether it's best to localize all this stuff into one class or make several of them ...? Left to my own devices, I was thinking of declaring a single class called CDIResources and using that as the One True Place to link Java EE's DI with CDI's DI. Many examples do something similar, but I'm not clear on whether they're "just" examples or whether that's a good way to do it. Thanks.

    Read the article

  • how to obtain the relative path of a resource in a j2ee project

    - by Neeraj
    I have a Dynamic Web Project having a flat file (or say text file). I have created a servlet in which I need to use this file. My code is as following: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // String resource = request.getParameter ("json") ; if ( resource != null && !resource.equals ( "" ) ) { //use getResourceAsStream ( ) to properly get the file. InputStream is = getServletContext ().getResourceAsStream ("rateJSON") ; if ( is != null ) { // the resource exists response.setContentType("application/json"); response.setHeader("Pragma", "No-cache"); response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); StringWriter sw = new StringWriter ( ) ; for ( int c = is.read ( ) ; c != -1; c = is.read ( ) ) { sw.write ( c ) ; } PrintWriter out = response.getWriter(); out.print (sw.toString ()) ; out.flush(); } } } The problem is that the InputStream is has null value. I'm not sure how to get the correct relative path. I'm using JBOSS as the app server. I have added the resource file in the WebContent directory of a Dynamic Web Project. As a different approch, I tried this: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub ServletConfig config = getServletConfig(); String contextName = config.getInitParameter("ApplicationName"); System.out.println("context name"+ contextName); String contextPath = config.getServletContext().getRealPath(contextName); System.out.println("context Path"+contextPath); //contextPath = contextPath.substring(0, contextPath.indexOf(contextName)); contextPath += "\\rateJSON.txt"; System.out.println(contextPath); String resource = request.getParameter ("json") ; System.out.println("Hi there1"+resource); if ( resource != null && !resource.equals ( "" ) ) { System.out.println("Hi there"); //use getResourceAsStream ( ) to properly get the file. //InputStream is = getServletContext ().getResourceAsStream (resource) ; InputStream is = getServletConfig().getServletContext().getResourceAsStream(contextPath); if ( is != null ) { // the resource exists System.out.println("Hi there2"); response.setContentType("application/json"); response.setHeader("Pragma", "No-cache"); response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); StringWriter sw = new StringWriter ( ); for ( int c = is.read ( ) ; c != -1; c = is.read ( ) ) { sw.write ( c ) ; System.out.println(c); } PrintWriter out = response.getWriter(); out.print (sw.toString ()) ; System.out.println(sw.toString()); out.flush(); } } } The value of contextPath is now: C:\JBOSS\jboss-5.0.1.GA\server\default\tmp\4p72206b-uo5r7k-g0vn9pof-1-g0vsh0o9-b7\Nationwide.war\WEB-INF\rateJSON But at this location the rateJSON file is not there? It seems JBOSS is not putting this file in the App.war or doesn't deploy it??? Could someone please help me?

    Read the article

  • Jetty - Virtualhosting - SSL Certificates

    - by Walter White
    Hi all, I want to have different SSL certificates for different domains that I am hosting in a single Jetty instance. I do not want to front my Jetty application server with Apache. I am running Jetty 6.1.22. So far, I have only seen configurations with a single SSL certificate, and the configuration for SSL happens within server which leads me to believe that Jetty was designed to support a single SSL certificate. Please let me know if I can use Jetty with more than 1 certificate. I am considering migrating to JBoss Application Server 6.0 since it is closer to a real application server. Is this something that can be done there, and is it a supported feature? Walter

    Read the article

  • Using my System as the server- need advice

    - by Ashwin
    We are deploying my web application in my system in jboss. And I am planning to use my system as the server as well. There are no html pages or jsp pages deployed. The client requests for resources and the server provides the resources in the form of objects. We are also using databases(Postgresql-15 tables) as the database server(this will also reside in my machine). My system configuration is Windows Vista, 2.3 GHZ, 4GB Ram, 32 bit. There can be many requests coming in at the same time. So is this configuration enough? Should we go with a different Operating System like Windows Server? I have never used Windows Server OS. How will it be different from other windows operating systems? Or if you feel please some other OS will be good in this situation, please suggest.

    Read the article

  • Linux commands shows different results

    - by ClydeFrog
    I'm really having a hard time to process these results on my Ubuntu server. I have a major problem with my JBoss server where I get FileNotFoundExceptions along with "No space left on device" errors. And I thought "maybe I'm out of disk space", and used df command to figure out how much I have left: root@ubuntu1:/# df -h Filsystem Storlek Anvnt Tillg Anv% Monterat på /dev/mapper/ubuntu1-root 36G 13G 21G 38% / none 2,0G 192K 2,0G 1% /dev none 2,0G 0 2,0G 0% /dev/shm none 2,0G 64K 2,0G 1% /var/run none 2,0G 0 2,0G 0% /var/lock /dev/sda1 228M 23M 193M 11% /boot /dev/mapper/vgdata-lvdata 79G 9,2G 66G 13% /data And as you can see, I have plenty of space left. And I also checked if I'm out of i-nodes: root@ubuntu1:/# df -i Filsystem Inoder IAnv IFria IAnv% Monterat på /dev/mapper/ubuntu1-root 2346512 61992 2284520 3% / none 505380 773 504607 1% /dev none 507383 1 507382 1% /dev/shm none 507383 30 507353 1% /var/run none 507383 2 507381 1% /var/lock /dev/sda1 124496 230 124266 1% /boot /dev/mapper/vgdata-lvdata 10486784 233945 10252839 3% /data But then i used du: root@ubuntu1:/# du -s -h /* 7,5M /bin 23M /boot 19G /data 192K /dev 11G /eniro 5,3M /etc 112K /home 0 /initrd.img 183M /lib 0 /lib64 16K /lost+found 12K /media 4,0K /mnt 4,0K /opt du: kan inte komma åt "/proc/20452/task/20452/fd/3": Filen eller katalogen finns inte du: kan inte komma åt "/proc/20452/task/20452/fdinfo/3": Filen eller katalogen finns inte du: kan inte komma åt "/proc/20452/fd/3": Filen eller katalogen finns inte du: kan inte komma åt "/proc/20452/fdinfo/3": Filen eller katalogen finns inte 0 /proc 18M /root 8,2M /sbin 4,0K /selinux 8,0K /srv 0 /sys 40K /tmp 691M /usr 1,2G /var 0 /vmlinuz Notice that /data and /eniro are 30G combined! How is it possible? Do I have a memory leak somewhere? Or is it something else? ----- EDIT 1 ----- Ok, I figured out that /data has its own mount so it's not possible to combine /data and /eniro because they aren't on the same mount. But how come it says 9,2G on the first command when it says 19G on the third on directory /data?

    Read the article

  • JBoss Seam - Jetty - Virtualhosting

    - by Walter White
    Hi all, I am trying to cutback on the memory usage of my server and would like to optimize the architecture. I currently deploy 2 separate web applications to Jetty 6.1.22 that correspond to different virtualhosts. They have pretty much the same application stack except one has fewer components and are styled differently (content, images, css, etc.). If I change my design pattern over to EJB / EAR + 2 WARS embedded, will that lower the memory consumption? Will that give me a single instance of JBoss Seam, Quartz, and all of my components? They must use a different datasource. Thanks, Walter

    Read the article

  • Java JMS Messaging

    - by London
    Hello, I have a working example of sending message to server and server receiving it via qpid messaging. Here is simple hello world to send to server : http://pastebin.com/M7mSECJn And here is server which receives requests and sends response(the current client doesn't receive response) : http://pastebin.com/2mEeuzrV Here is my property file : http://pastebin.com/TLEFdpXG They all work perfectly, I can see the messages in the qpid queue via Qpid JMX management console. These examples are downloaded from https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example (someone may need it also). I've done Jboss messaging using spring before, but I can't manage to do the same with qpid. With jboss inside applicationsContext I had beans jndiTemplate, conectionFactory, destinationQueue, and jmscontainer like this : <!-- Queue configuration --> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop> <prop key="java.naming.provider.url">jnp://localhost:1099</prop> <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop> <prop key="java.naming.security.principal">admin</prop> <prop key="java.naming.security.credentials">admin</prop> </props> </property> </bean> <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate" /> <property name="jndiName" value="ConnectionFactory" /> </bean> <bean id="queueDestination" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate" /> <property name="jndiName"> <value>queue/testQueue</value> </property> </bean> <bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="connectionFactory" /> <property name="destination" ref="queueDestination" /> <property name="messageListener" ref="listener" /> </bean> and of course sender and listener : Now I'd like to rewrite this qpid example using spring context logic. Can anyone help me?

    Read the article

  • Performance benefits of upgrading Richfaces to newer version

    - by peteDog
    I have a client that's running an application based on JBoss 4.0.5, Seam 1.2 and RichFaces 3.0.1. Their system is having performance problems due to the fact that a lot of data is coming back from the server to be displayed on screen and it seems like the rendering of that data is taking forever. The data brought back is displayed in a tabbed interface, but the tabs aren't currently being loaded individually, but all at once. I'm trying to build up a case to present to the client on the benefits of upgrading to never version of RichFaces, which, as I understand it, has added a great number of features related to tabbed panels and being able to use ajax to page the data and load the chunks you actually need to display at the moment, and not the rest that's in other tabs. The move to a newer version of RichFaces will also result in never versions of Jboss and Seam, as the current production build of RichFaces 3.2.1 requires JSF 1.2. IF anyone has some suggestions or experience on performance of current versions RichFaces, paging, etc, I would really appreciate some feedback.

    Read the article

  • Enabling Hibernate second-level cache with JPA on JBoss 4.2

    - by Peter Hilton
    What are the steps required to enable Hibernate's second-level cache, when using the Java Persistence API (annotated entities)? How do I check that it's working? I'm using JBoss 4.2.2.GA. From the Hibernate documentation, it seems that I need to enable the cache and specify a cache provider in persistence.xml, like: <property name="hibernate.cache.use_second_level_cache" value="true" /> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" /> What else is required? Do I need to add @Cache annotations to my JPA entities? How can I tell if the cache is working? I have tried accessing cache statistics after running a Query, but Statistics.getSecondLevelCacheStatistics returns null, perhaps because I don't know what 'region' name to use.

    Read the article

  • PERSISTENCE LOB WITH JPA

    - by rfders
    Hi, Folks. I have this problem using JBOSS, EJB3 and MSSQL Express . i'm trying to persist an entity with an Blob attribute which was converted into a byte[], apparently it create the entity perfectly, no error was logged at jboss's console. but when i check into database the column is null. i already checked the Object to byte[] method and it is fine. i tried assigning Image and varbinary(Max) data type to this column. so i really don't know what it happening, why the column is not inserted into database. thanks a lot.

    Read the article

  • How to propagate spring security login to EJBs?

    - by tangens
    Context I have a J2EE application running on a JBoss 4.2.3 application server. The application is reachabe through a web interface. The authentication is done with basic authentication. Inside of the EJBs I ask the security context of the bean for the principal (the name of the logged in user) and do some authorization checks if this user is allowed to access this method of the EJB. The EJBs life inside a different ear than the servlets handling the web frontend, so I can't access the spring application context directly. Required change I want to switch to Spring Security for handling the user login. Question How can I propagate the spring login information to the JBoss security context so I can still use my EJBs without having to rewrite them? Ideas and links I already found a page talking about "Propagating Identity from Spring Security to the EJB Layer", but unfortunatelly it refers to an older version of Spring Security (Acegi) and I'm not familiar enough with Spring Security to make this work with the actual version (3.0.2).

    Read the article

  • How to stop endless EJB 3 timer ?

    - by worldpython
    Hi, I am new to EJB 3 . I use the following code to start endless EJB 3 timer then deploying it on JBOSS 4.2.3 @Stateless public class SimpleBean implements SimpleBeanRemote,TimerService { @Resource TimerService timerService; private Timer timer ; @Timeout public void timeout(Timer timer) { System.out.println("Hello EJB"); } } then calling it timer = timerService.createTimer(10, 5000, null); It works well. I created a client class that calls a method that creates the timer and a method that is called when the timer times out. I forget to call cancel then it does not stop .redeploy with cancel call never stop it. restart Jboss 4.2.3 never stop it. How I can stop EJB timer ? Thanks for helping.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >